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
e64e66c4
Commit
e64e66c4
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.
parent
85eeccc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
crl.c
dlls/crypt32/tests/crl.c
+18
-12
No files found.
dlls/crypt32/tests/crl.c
View file @
e64e66c4
...
...
@@ -87,22 +87,25 @@ static void init_function_pointers(void)
static
void
testCreateCRL
(
void
)
{
PCCRL_CONTEXT
context
;
DWORD
GLE
;
context
=
CertCreateCRLContext
(
0
,
NULL
,
0
);
ok
(
!
context
&&
GetLastError
()
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
context
=
CertCreateCRLContext
(
X509_ASN_ENCODING
,
NULL
,
0
);
ok
(
!
context
&&
GetLastError
()
==
CRYPT_E_ASN1_EOD
,
"Expected CRYPT_E_ASN1_EOD, got %08x
\n
"
,
GetLastError
());
GLE
=
GetLastError
();
ok
(
!
context
&&
(
GLE
==
CRYPT_E_ASN1_EOD
||
GLE
==
OSS_MORE_INPUT
),
"Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x
\n
"
,
GLE
);
context
=
CertCreateCRLContext
(
X509_ASN_ENCODING
,
bigCert
,
sizeof
(
bigCert
));
ok
(
!
context
&&
GetLastError
()
==
CRYPT_E_ASN1_CORRUPT
,
"Expected CRYPT_E_ASN1_CORRUPT, got %08x
\n
"
,
GetLastError
());
GLE
=
GetLastError
();
ok
(
!
context
&&
(
GLE
==
CRYPT_E_ASN1_CORRUPT
||
GLE
==
OSS_DATA_ERROR
),
"Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x
\n
"
,
GLE
);
context
=
CertCreateCRLContext
(
X509_ASN_ENCODING
,
signedCRL
,
sizeof
(
signedCRL
)
-
1
);
ok
(
!
context
&&
(
G
etLastError
()
==
CRYPT_E_ASN1_EOD
||
G
etLastError
()
==
CRYPT_E_ASN1_CORRUPT
),
"Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %08x
\n
"
,
G
etLastError
()
);
ok
(
!
context
&&
(
G
LE
==
CRYPT_E_ASN1_EOD
||
GLE
==
CRYPT_E_ASN1_CORRUPT
||
G
LE
==
OSS_DATA_ERROR
),
"Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT
or OSS_DATA_ERROR
, got %08x
\n
"
,
G
LE
);
context
=
CertCreateCRLContext
(
X509_ASN_ENCODING
,
signedCRL
,
sizeof
(
signedCRL
));
ok
(
context
!=
NULL
,
"CertCreateCRLContext failed: %08x
\n
"
,
GetLastError
());
...
...
@@ -120,6 +123,7 @@ static void testAddCRL(void)
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
PCCRL_CONTEXT
context
;
BOOL
ret
;
DWORD
GLE
;
if
(
!
store
)
return
;
...
...
@@ -148,11 +152,13 @@ static void testAddCRL(void)
/* No CRL */
ret
=
CertAddEncodedCRLToStore
(
0
,
X509_ASN_ENCODING
,
NULL
,
0
,
0
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_EOD
,
"Expected CRYPT_E_ASN1_EOD, got %08x
\n
"
,
GetLastError
());
GLE
=
GetLastError
();
ok
(
!
ret
&&
(
GLE
==
CRYPT_E_ASN1_EOD
||
GLE
==
OSS_MORE_INPUT
),
"Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x
\n
"
,
GLE
);
ret
=
CertAddEncodedCRLToStore
(
store
,
X509_ASN_ENCODING
,
NULL
,
0
,
0
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_EOD
,
"Expected CRYPT_E_ASN1_EOD, got %08x
\n
"
,
GetLastError
());
GLE
=
GetLastError
();
ok
(
!
ret
&&
(
GLE
==
CRYPT_E_ASN1_EOD
||
GLE
==
OSS_MORE_INPUT
),
"Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x
\n
"
,
GLE
);
/* Weird--bad add disposition leads to an access violation in Windows. */
ret
=
CertAddEncodedCRLToStore
(
0
,
X509_ASN_ENCODING
,
signedCRL
,
...
...
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