Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
f575d856
Commit
f575d856
authored
17 years ago
by
Juan Lang
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
crypt32: Accept OSS errors as well.
parent
e64e66c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/crypt32/tests/store.c
+14
-10
14 additions, 10 deletions
dlls/crypt32/tests/store.c
with
14 additions
and
10 deletions
dlls/crypt32/tests/store.c
+
14
−
10
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment