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
6d337982
Commit
6d337982
authored
Jul 30, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 31, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Don't crash on some win9x boxes.
parent
14b24058
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
19 deletions
+31
-19
cert.c
dlls/crypt32/tests/cert.c
+31
-19
No files found.
dlls/crypt32/tests/cert.c
View file @
6d337982
...
...
@@ -157,19 +157,23 @@ static void testAddCert(void)
return
;
/* Weird--bad add disposition leads to an access violation in Windows.
* Both tests crash on some win9x boxes.
*/
ret
=
CertAddEncodedCertificateToStore
(
0
,
X509_ASN_ENCODING
,
bigCert
,
sizeof
(
bigCert
),
0
,
NULL
);
ok
(
!
ret
&&
(
GetLastError
()
==
STATUS_ACCESS_VIOLATION
||
GetLastError
()
==
E_INVALIDARG
),
"Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
ret
=
CertAddEncodedCertificateToStore
(
store
,
X509_ASN_ENCODING
,
bigCert
,
sizeof
(
bigCert
),
0
,
NULL
);
ok
(
!
ret
&&
(
GetLastError
()
==
STATUS_ACCESS_VIOLATION
||
GetLastError
()
==
E_INVALIDARG
),
"Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
if
(
0
)
{
ret
=
CertAddEncodedCertificateToStore
(
0
,
X509_ASN_ENCODING
,
bigCert
,
sizeof
(
bigCert
),
0
,
NULL
);
ok
(
!
ret
&&
(
GetLastError
()
==
STATUS_ACCESS_VIOLATION
||
GetLastError
()
==
E_INVALIDARG
),
"Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
ret
=
CertAddEncodedCertificateToStore
(
store
,
X509_ASN_ENCODING
,
bigCert
,
sizeof
(
bigCert
),
0
,
NULL
);
ok
(
!
ret
&&
(
GetLastError
()
==
STATUS_ACCESS_VIOLATION
||
GetLastError
()
==
E_INVALIDARG
),
"Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
}
/* Weird--can add a cert to the NULL store (does this have special
* meaning?)
...
...
@@ -1746,10 +1750,14 @@ static void testSignAndEncodeCert(void)
&
algID
,
NULL
,
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %08x
\n
"
,
GetLastError
());
ret
=
CryptSignAndEncodeCertificate
(
0
,
0
,
X509_ASN_ENCODING
,
X509_CERT_TO_BE_SIGNED
,
NULL
,
&
algID
,
NULL
,
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
STATUS_ACCESS_VIOLATION
,
"Expected STATUS_ACCESS_VIOLATION, got %08x
\n
"
,
GetLastError
());
/* Crashes on some win9x boxes */
if
(
0
)
{
ret
=
CryptSignAndEncodeCertificate
(
0
,
0
,
X509_ASN_ENCODING
,
X509_CERT_TO_BE_SIGNED
,
NULL
,
&
algID
,
NULL
,
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
STATUS_ACCESS_VIOLATION
,
"Expected STATUS_ACCESS_VIOLATION, got %08x
\n
"
,
GetLastError
());
}
/* Crashes
ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING,
X509_CERT_TO_BE_SIGNED, &info, NULL, NULL, NULL, &size);
...
...
@@ -2522,9 +2530,13 @@ static void testHashPublicKeyInfo(void)
ret
=
CryptHashPublicKeyInfo
(
0
,
0
,
0
,
0
,
NULL
,
NULL
,
&
len
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %08x
\n
"
,
GetLastError
());
ret
=
CryptHashPublicKeyInfo
(
0
,
0
,
0
,
X509_ASN_ENCODING
,
NULL
,
NULL
,
&
len
);
ok
(
!
ret
&&
GetLastError
()
==
STATUS_ACCESS_VIOLATION
,
"Expected STATUS_ACCESS_VIOLATION, got %08x
\n
"
,
GetLastError
());
/* Crashes on some win9x boxes */
if
(
0
)
{
ret
=
CryptHashPublicKeyInfo
(
0
,
0
,
0
,
X509_ASN_ENCODING
,
NULL
,
NULL
,
&
len
);
ok
(
!
ret
&&
GetLastError
()
==
STATUS_ACCESS_VIOLATION
,
"Expected STATUS_ACCESS_VIOLATION, got %08x
\n
"
,
GetLastError
());
}
ret
=
CryptHashPublicKeyInfo
(
0
,
0
,
0
,
X509_ASN_ENCODING
,
&
info
,
NULL
,
&
len
);
ok
(
ret
,
"CryptHashPublicKeyInfo failed: %08x
\n
"
,
GetLastError
());
ok
(
len
==
16
,
"Expected hash size 16, got %d
\n
"
,
len
);
...
...
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