Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f575d856
Commit
f575d856
authored
Jun 29, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jul 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Accept OSS errors as well.
parent
e64e66c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
store.c
dlls/crypt32/tests/store.c
+14
-10
No files found.
dlls/crypt32/tests/store.c
View file @
f575d856
...
...
@@ -99,6 +99,7 @@ static void testMemStore(void)
HCERTSTORE
store1
,
store2
;
PCCERT_CONTEXT
context
;
BOOL
ret
;
DWORD
GLE
;
/* NULL provider */
store1
=
CertOpenStore
(
0
,
0
,
0
,
0
,
NULL
);
...
...
@@ -124,13 +125,15 @@ static void testMemStore(void)
context
=
NULL
;
ret
=
CertAddEncodedCertificateToStore
(
store1
,
X509_ASN_ENCODING
,
emptyCert
,
sizeof
(
emptyCert
),
CERT_STORE_ADD_ALWAYS
,
&
context
);
/* Windows returns CRYPT_E_ASN1_EOD, but accept CRYPT_E_ASN1_CORRUPT as
* well (because matching errors is tough in this case)
/* Windows returns CRYPT_E_ASN1_EOD or OSS_DATA_ERROR, but accept
* CRYPT_E_ASN1_CORRUPT as well (because matching errors is tough in this
* case)
*/
ok
(
!
ret
&&
(
GetLastError
()
==
CRYPT_E_ASN1_EOD
||
GetLastError
()
==
CRYPT_E_ASN1_CORRUPT
),
"Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %08x
\n
"
,
GetLastError
());
GLE
=
GetLastError
();
ok
(
!
ret
&&
(
GLE
==
CRYPT_E_ASN1_EOD
||
GLE
==
CRYPT_E_ASN1_CORRUPT
||
GLE
==
OSS_DATA_ERROR
),
"Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x
\n
"
,
GLE
);
/* add a "signed" cert--the signature isn't a real signature, so this adds
* without any check of the signature's validity
*/
...
...
@@ -152,10 +155,11 @@ static void testMemStore(void)
/* try adding a "signed" CRL as a cert */
ret
=
CertAddEncodedCertificateToStore
(
store1
,
X509_ASN_ENCODING
,
signedCRL
,
sizeof
(
signedCRL
),
CERT_STORE_ADD_ALWAYS
,
&
context
);
ok
(
!
ret
&&
(
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
||
GetLastError
()
==
CRYPT_E_ASN1_CORRUPT
),
"Expected CRYPT_E_ASN1_BADTAG or CRYPT_E_ASN1_CORRUPT, got %08x
\n
"
,
GetLastError
());
GLE
=
GetLastError
();
ok
(
!
ret
&&
(
GLE
==
CRYPT_E_ASN1_BADTAG
||
GLE
==
CRYPT_E_ASN1_CORRUPT
||
GLE
==
OSS_DATA_ERROR
),
"Expected CRYPT_E_ASN1_BADTAG or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x
\n
"
,
GLE
);
/* add a cert to store1 */
ret
=
CertAddEncodedCertificateToStore
(
store1
,
X509_ASN_ENCODING
,
bigCert
,
sizeof
(
bigCert
),
CERT_STORE_ADD_ALWAYS
,
&
context
);
...
...
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