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
c5d5c5b6
Commit
c5d5c5b6
authored
Nov 07, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fail decoding a CRL entry if the serial number is empty.
parent
571d7518
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
decode.c
dlls/crypt32/decode.c
+6
-0
encode.c
dlls/crypt32/tests/encode.c
+1
-1
No files found.
dlls/crypt32/decode.c
View file @
c5d5c5b6
...
...
@@ -1065,6 +1065,12 @@ static BOOL CRYPT_AsnDecodeCRLEntry(const BYTE *pbEncoded, DWORD cbEncoded,
ret
=
CRYPT_AsnDecodeSequence
(
items
,
sizeof
(
items
)
/
sizeof
(
items
[
0
]),
pbEncoded
,
cbEncoded
,
dwFlags
,
NULL
,
entry
,
pcbStructInfo
,
pcbDecoded
,
entry
?
entry
->
SerialNumber
.
pbData
:
NULL
);
if
(
ret
&&
entry
&&
!
entry
->
SerialNumber
.
cbData
)
{
WARN
(
"empty CRL entry serial number
\n
"
);
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
}
return
ret
;
}
...
...
dlls/crypt32/tests/encode.c
View file @
c5d5c5b6
...
...
@@ -4269,7 +4269,7 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding)
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_CERT_CRL_TO_BE_SIGNED
,
v1CRLWithIssuerAndEmptyEntry
,
v1CRLWithIssuerAndEmptyEntry
[
1
]
+
2
,
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_CORRUPT
,
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_CORRUPT
,
"Expected CRYPT_E_ASN1_CORRUPT, got %08x
\n
"
,
GetLastError
());
/* with a real CRL entry */
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_CERT_CRL_TO_BE_SIGNED
,
...
...
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