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
09454507
Commit
09454507
authored
Sep 02, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Sep 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix several failing tests in win9x.
parent
99a5afa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
+26
-9
cert.c
dlls/crypt32/tests/cert.c
+26
-9
No files found.
dlls/crypt32/tests/cert.c
View file @
09454507
...
...
@@ -513,7 +513,8 @@ static void testCertProperties(void)
CERT_SIGNATURE_HASH_PROP_ID
,
NULL
,
&
size
);
ok
(
!
ret
&&
(
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
||
GetLastError
()
==
CRYPT_E_NOT_FOUND
),
GetLastError
()
==
CRYPT_E_NOT_FOUND
||
GetLastError
()
==
OSS_DATA_ERROR
),
/* win9x */
"Expected CRYPT_E_ASN1_BADTAG, got %08x
\n
"
,
GetLastError
());
/* Test key contexts and handles and such */
...
...
@@ -1815,7 +1816,9 @@ static void testSignAndEncodeCert(void)
*/
ret
=
CryptSignAndEncodeCertificate
(
0
,
0
,
X509_ASN_ENCODING
,
X509_CERT_TO_BE_SIGNED
,
&
info
,
&
algID
,
NULL
,
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
NTE_BAD_ALGID
,
ok
(
!
ret
&&
(
GetLastError
()
==
NTE_BAD_ALGID
||
GetLastError
()
==
OSS_BAD_PTR
),
/* win9x */
"Expected NTE_BAD_ALGID, got %08x
\n
"
,
GetLastError
());
algID
.
pszObjId
=
oid_rsa_md5rsa
;
ret
=
CryptSignAndEncodeCertificate
(
0
,
0
,
X509_ASN_ENCODING
,
...
...
@@ -2625,19 +2628,25 @@ static void testHashToBeSigned(void)
"expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CryptHashToBeSigned
(
0
,
X509_ASN_ENCODING
,
NULL
,
0
,
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_EOD
,
ok
(
!
ret
&&
(
GetLastError
()
==
CRYPT_E_ASN1_EOD
||
GetLastError
()
==
OSS_BAD_ARG
),
/* win9x */
"expected CRYPT_E_ASN1_EOD, got %08x
\n
"
,
GetLastError
());
/* Can't sign anything: has to be asn.1 encoded, at least */
SetLastError
(
0xdeadbeef
);
ret
=
CryptHashToBeSigned
(
0
,
X509_ASN_ENCODING
,
int1
,
sizeof
(
int1
),
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
,
ok
(
!
ret
&&
(
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
||
GetLastError
()
==
OSS_MORE_INPUT
),
/* win9x */
"expected CRYPT_E_ASN1_BADTAG, got %08x
\n
"
,
GetLastError
());
/* Can't be empty, either */
SetLastError
(
0xdeadbeef
);
ret
=
CryptHashToBeSigned
(
0
,
X509_ASN_ENCODING
,
emptyCert
,
sizeof
(
emptyCert
),
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_CORRUPT
,
ok
(
!
ret
&&
(
GetLastError
()
==
CRYPT_E_ASN1_CORRUPT
||
GetLastError
()
==
OSS_DATA_ERROR
),
/* win9x */
"expected CRYPT_E_ASN1_CORRUPT, got %08x
\n
"
,
GetLastError
());
/* Signing a cert works */
ret
=
CryptHashToBeSigned
(
0
,
X509_ASN_ENCODING
,
md5SignedEmptyCert
,
...
...
@@ -3021,7 +3030,9 @@ static void testGetPublicKeyLength(void)
ret
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CertGetPublicKeyLength
(
X509_ASN_ENCODING
,
&
info
);
ok
(
ret
==
0
&&
GetLastError
()
==
CRYPT_E_ASN1_EOD
,
ok
(
ret
==
0
&&
(
GetLastError
()
==
CRYPT_E_ASN1_EOD
||
GetLastError
()
==
OSS_BAD_ARG
),
/* win9x */
"Expected length 0 and CRYPT_E_ASN1_EOD, got length %d, %08x
\n
"
,
ret
,
GetLastError
());
/* With a nearly-empty public key info */
...
...
@@ -3033,7 +3044,9 @@ static void testGetPublicKeyLength(void)
ret
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CertGetPublicKeyLength
(
X509_ASN_ENCODING
,
&
info
);
ok
(
ret
==
0
&&
GetLastError
()
==
CRYPT_E_ASN1_EOD
,
ok
(
ret
==
0
&&
(
GetLastError
()
==
CRYPT_E_ASN1_EOD
||
GetLastError
()
==
OSS_BAD_ARG
),
/* win9x */
"Expected length 0 and CRYPT_E_ASN1_EOD, got length %d, %08x
\n
"
,
ret
,
GetLastError
());
/* With a bogus key */
...
...
@@ -3046,7 +3059,9 @@ static void testGetPublicKeyLength(void)
ret
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CertGetPublicKeyLength
(
X509_ASN_ENCODING
,
&
info
);
ok
(
ret
==
0
&&
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
,
ok
(
ret
==
0
&&
(
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
||
GetLastError
()
==
OSS_PDU_MISMATCH
),
/* win9x */
"Expected length 0 and CRYPT_E_ASN1_BADTAGTAG, got length %d, %08x
\n
"
,
ret
,
GetLastError
());
/* With a believable RSA key but a bogus OID */
...
...
@@ -3065,7 +3080,9 @@ static void testGetPublicKeyLength(void)
info
.
Algorithm
.
pszObjId
=
oid_rsa_dh
;
SetLastError
(
0xdeadbeef
);
ret
=
CertGetPublicKeyLength
(
X509_ASN_ENCODING
,
&
info
);
ok
(
ret
==
0
&&
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
,
ok
(
ret
==
0
&&
(
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
||
GetLastError
()
==
E_INVALIDARG
),
/* win9x */
"Expected length 0 and CRYPT_E_ASN1_BADTAG, got length %d, %08x
\n
"
,
ret
,
GetLastError
());
/* With the RSA OID */
...
...
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