Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6de79d64
Commit
6de79d64
authored
Mar 10, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Requestor name is optional in OCSP request.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7de22a74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
9 deletions
+33
-9
encode.c
dlls/crypt32/encode.c
+12
-9
encode.c
dlls/crypt32/tests/encode.c
+21
-0
No files found.
dlls/crypt32/encode.c
View file @
6de79d64
...
...
@@ -4632,18 +4632,21 @@ static BOOL WINAPI CRYPT_AsnEncodeOCSPRequest(DWORD dwCertEncodingType,
{
struct
AsnConstructedItem
name
;
struct
AsnEncodeSequenceItem
items
[
2
];
DWORD
count
=
1
;
name
.
tag
=
1
;
name
.
pvStructInfo
=
info
->
pRequestorName
;
name
.
encodeFunc
=
CRYPT_AsnEncodeAltNameEntry
;
items
[
0
].
pvStructInfo
=
&
name
;
items
[
0
].
encodeFunc
=
CRYPT_AsnEncodeConstructed
;
DWORD
count
=
0
;
if
(
info
->
pRequestorName
)
{
name
.
tag
=
1
;
name
.
pvStructInfo
=
info
->
pRequestorName
;
name
.
encodeFunc
=
CRYPT_AsnEncodeAltNameEntry
;
items
[
count
].
pvStructInfo
=
&
name
;
items
[
count
].
encodeFunc
=
CRYPT_AsnEncodeConstructed
;
count
++
;
}
if
(
info
->
cRequestEntry
)
{
items
[
1
].
pvStructInfo
=
&
info
->
cRequestEntry
;
items
[
1
].
encodeFunc
=
CRYPT_AsnEncodeOCSPRequestEntries
;
items
[
count
].
pvStructInfo
=
&
info
->
cRequestEntry
;
items
[
count
].
encodeFunc
=
CRYPT_AsnEncodeOCSPRequestEntries
;
count
++
;
}
...
...
dlls/crypt32/tests/encode.c
View file @
6de79d64
...
...
@@ -8656,6 +8656,17 @@ static void test_encodeOCSPRequestInfo(DWORD dwEncoding)
0xd8
,
0x04
,
0x14
,
0xb7
,
0x6b
,
0xa2
,
0xea
,
0xa8
,
0xaa
,
0x84
,
0x8c
,
0x79
,
0xea
,
0xb4
,
0xda
,
0x0f
,
0x98
,
0xb2
,
0xc5
,
0x95
,
0x76
,
0xb9
,
0xf4
,
0x02
,
0x10
,
0xb1
,
0xc1
,
0x87
,
0x54
,
0x54
,
0xac
,
0x1e
,
0x55
,
0x40
,
0xfb
,
0xef
,
0xd9
,
0x6d
,
0x8f
,
0x49
,
0x08
};
static
const
BYTE
expected3
[]
=
{
0x30
,
0x81
,
0x9d
,
0x30
,
0x81
,
0x9a
,
0x30
,
0x4b
,
0x30
,
0x49
,
0x30
,
0x09
,
0x06
,
0x05
,
0x2b
,
0x0e
,
0x03
,
0x02
,
0x1a
,
0x05
,
0x00
,
0x04
,
0x14
,
0xe4
,
0xe3
,
0x95
,
0xa2
,
0x29
,
0xd3
,
0xd4
,
0xc1
,
0xc3
,
0x1f
,
0xf0
,
0x98
,
0x0c
,
0x0b
,
0x4e
,
0xc0
,
0x09
,
0x8a
,
0xab
,
0xd8
,
0x04
,
0x14
,
0xb7
,
0x6b
,
0xa2
,
0xea
,
0xa8
,
0xaa
,
0x84
,
0x8c
,
0x79
,
0xea
,
0xb4
,
0xda
,
0x0f
,
0x98
,
0xb2
,
0xc5
,
0x95
,
0x76
,
0xb9
,
0xf4
,
0x02
,
0x10
,
0xb1
,
0xc1
,
0x87
,
0x54
,
0x54
,
0xac
,
0x1e
,
0x55
,
0x40
,
0xfb
,
0xef
,
0xd9
,
0x6d
,
0x8f
,
0x49
,
0x08
,
0x30
,
0x4b
,
0x30
,
0x49
,
0x30
,
0x09
,
0x06
,
0x05
,
0x2b
,
0x0e
,
0x03
,
0x02
,
0x1a
,
0x05
,
0x00
,
0x04
,
0x14
,
0xe4
,
0xe3
,
0x95
,
0xa2
,
0x29
,
0xd3
,
0xd4
,
0xc1
,
0xc3
,
0x1f
,
0xf0
,
0x98
,
0x0c
,
0x0b
,
0x4e
,
0xc0
,
0x09
,
0x8a
,
0xab
,
0xd8
,
0x04
,
0x14
,
0xb7
,
0x6b
,
0xa2
,
0xea
,
0xa8
,
0xaa
,
0x84
,
0x8c
,
0x79
,
0xea
,
0xb4
,
0xda
,
0x0f
,
0x98
,
0xb2
,
0xc5
,
0x95
,
0x76
,
0xb9
,
0xf4
,
0x02
,
0x10
,
0xb1
,
0xc1
,
0x87
,
0x54
,
0x54
,
0xac
,
0x1e
,
0x55
,
0x40
,
0xfb
,
0xef
,
0xd9
,
0x6d
,
0x8f
,
0x49
,
0x08
};
static
const
BYTE
issuer_name
[]
=
{
0xe4
,
0xe3
,
0x95
,
0xa2
,
0x29
,
0xd3
,
0xd4
,
0xc1
,
0xc3
,
0x1f
,
0xf0
,
0x98
,
0x0c
,
0x0b
,
0x4e
,
0xc0
,
0x09
,
0x8a
,
0xab
,
0xd8
};
...
...
@@ -8715,6 +8726,16 @@ static void test_encodeOCSPRequestInfo(DWORD dwEncoding)
ok
(
size
==
sizeof
(
expected2
),
"got %lu
\n
"
,
size
);
ok
(
!
memcmp
(
buf
,
expected2
,
sizeof
(
expected2
)),
"unexpected value
\n
"
);
LocalFree
(
buf
);
/* requestor name not set */
info
.
pRequestorName
=
NULL
;
size
=
0
;
SetLastError
(
0xdeadbeef
);
ret
=
pCryptEncodeObjectEx
(
dwEncoding
,
OCSP_REQUEST
,
&
info
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
ok
(
ret
,
"got %08lx
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
expected3
),
"got %lu
\n
"
,
size
);
ok
(
!
memcmp
(
buf
,
expected3
,
sizeof
(
expected3
)),
"unexpected value
\n
"
);
LocalFree
(
buf
);
}
START_TEST
(
encode
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment