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
f4e7d7b8
Commit
f4e7d7b8
authored
Feb 23, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptui/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9aeb6d41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
28 deletions
+27
-28
Makefile.in
dlls/cryptui/tests/Makefile.in
+0
-1
cryptui.c
dlls/cryptui/tests/cryptui.c
+27
-27
No files found.
dlls/cryptui/tests/Makefile.in
View file @
f4e7d7b8
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
cryptui.dll
IMPORTS
=
cryptui crypt32 user32
...
...
dlls/cryptui/tests/cryptui.c
View file @
f4e7d7b8
...
...
@@ -349,27 +349,27 @@ static void test_crypt_ui_wiz_import(void)
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
memset
(
&
info
,
0
,
sizeof
(
info
));
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
info
.
dwSize
=
sizeof
(
info
);
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
info
.
dwSubjectChoice
=
CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_CONTEXT
;
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CERT
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
/* Check allowed vs. given type mismatches */
info
.
u
.
pCertContext
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
v1CertWithValidPubKey
,
sizeof
(
v1CertWithValidPubKey
));
...
...
@@ -377,7 +377,7 @@ static void test_crypt_ui_wiz_import(void)
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CRL
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
CertFreeCertificateContext
(
info
.
u
.
pCertContext
);
info
.
dwSubjectChoice
=
CRYPTUI_WIZ_IMPORT_SUBJECT_CRL_CONTEXT
;
info
.
u
.
pCRLContext
=
CertCreateCRLContext
(
X509_ASN_ENCODING
,
...
...
@@ -386,7 +386,7 @@ static void test_crypt_ui_wiz_import(void)
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CERT
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
CertFreeCRLContext
(
info
.
u
.
pCRLContext
);
/* Imports the following cert--self-signed, with no basic constraints set--
* to the CA store. Puts up a dialog at the end if it succeeds or fails.
...
...
@@ -395,7 +395,7 @@ static void test_crypt_ui_wiz_import(void)
info
.
u
.
pCertContext
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
v1CertWithValidPubKey
,
sizeof
(
v1CertWithValidPubKey
));
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
if
(
ret
)
{
HCERTSTORE
ca
=
CertOpenStore
(
CERT_STORE_PROV_SYSTEM_W
,
0
,
0
,
...
...
@@ -418,7 +418,7 @@ static void test_crypt_ui_wiz_import(void)
info
.
u
.
pCertContext
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
iTunesCert3
,
sizeof
(
iTunesCert3
));
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
if
(
ret
)
{
HCERTSTORE
addressBook
=
CertOpenStore
(
CERT_STORE_PROV_SYSTEM_W
,
0
,
0
,
...
...
@@ -442,7 +442,7 @@ static void test_crypt_ui_wiz_import(void)
{
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
}
store
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
X509_ASN_ENCODING
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
...
...
@@ -455,11 +455,11 @@ static void test_crypt_ui_wiz_import(void)
{
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE
,
0
,
NULL
,
&
info
,
store
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
}
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE
,
0
,
NULL
,
&
info
,
store
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
ret
=
find_and_delete_cert_in_store
(
store
,
info
.
u
.
pCertContext
);
ok
(
ret
||
broken
(
!
ret
)
/* Win9x/NT4 */
,
...
...
@@ -470,7 +470,7 @@ static void test_crypt_ui_wiz_import(void)
info
.
u
.
pCertContext
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
iTunesCert1
,
sizeof
(
iTunesCert1
));
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
if
(
ret
)
{
HCERTSTORE
addressBook
=
CertOpenStore
(
CERT_STORE_PROV_SYSTEM_W
,
0
,
0
,
...
...
@@ -491,7 +491,7 @@ static void test_crypt_ui_wiz_import(void)
info
.
u
.
pCertContext
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
iTunesCert2
,
sizeof
(
iTunesCert2
));
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
&
info
,
NULL
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
if
(
ret
)
{
HCERTSTORE
ca
=
CertOpenStore
(
CERT_STORE_PROV_SYSTEM_W
,
0
,
0
,
...
...
@@ -525,18 +525,18 @@ static void test_crypt_ui_wiz_import(void)
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CERT
,
0
,
NULL
,
&
info
,
store
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CRL
,
0
,
NULL
,
&
info
,
store
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE
|
CRYPTUI_WIZ_IMPORT_ALLOW_CERT
|
CRYPTUI_WIZ_IMPORT_ALLOW_CRL
,
0
,
NULL
,
&
info
,
store
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
if
(
ret
)
{
count
=
0
;
...
...
@@ -546,7 +546,7 @@ static void test_crypt_ui_wiz_import(void)
if
(
cert
)
count
++
;
}
while
(
cert
);
ok
(
count
==
1
,
"expected 1 cert, got %d
\n
"
,
count
);
ok
(
count
==
1
,
"expected 1 cert, got %
l
d
\n
"
,
count
);
count
=
0
;
crl
=
NULL
;
do
{
...
...
@@ -554,7 +554,7 @@ static void test_crypt_ui_wiz_import(void)
if
(
crl
)
count
++
;
}
while
(
crl
);
ok
(
count
==
1
,
"expected 1 CRL, got %d
\n
"
,
count
);
ok
(
count
==
1
,
"expected 1 CRL, got %
l
d
\n
"
,
count
);
}
CertCloseStore
(
store
,
0
);
CertCloseStore
(
info
.
u
.
hCertStore
,
0
);
...
...
@@ -572,7 +572,7 @@ static void test_crypt_ui_wiz_import(void)
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CERT
,
0
,
NULL
,
&
info
,
store
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
if
(
ret
)
{
count
=
0
;
...
...
@@ -582,7 +582,7 @@ static void test_crypt_ui_wiz_import(void)
if
(
cert
)
count
++
;
}
while
(
cert
);
ok
(
count
==
1
,
"expected 1 cert, got %d
\n
"
,
count
);
ok
(
count
==
1
,
"expected 1 cert, got %
l
d
\n
"
,
count
);
count
=
0
;
crl
=
NULL
;
do
{
...
...
@@ -590,13 +590,13 @@ static void test_crypt_ui_wiz_import(void)
if
(
crl
)
count
++
;
}
while
(
crl
);
ok
(
count
==
0
,
"expected 0 CRLs, got %d
\n
"
,
count
);
ok
(
count
==
0
,
"expected 0 CRLs, got %
l
d
\n
"
,
count
);
}
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CRL
,
0
,
NULL
,
&
info
,
store
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
CertCloseStore
(
store
,
0
);
CertCloseStore
(
info
.
u
.
hCertStore
,
0
);
...
...
@@ -612,7 +612,7 @@ static void test_crypt_ui_wiz_import(void)
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CRL
,
0
,
NULL
,
&
info
,
store
);
ok
(
ret
,
"CryptUIWizImport failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptUIWizImport failed: %08
l
x
\n
"
,
GetLastError
());
if
(
ret
)
{
count
=
0
;
...
...
@@ -622,7 +622,7 @@ static void test_crypt_ui_wiz_import(void)
if
(
cert
)
count
++
;
}
while
(
cert
);
ok
(
count
==
0
,
"expected 0 certs, got %d
\n
"
,
count
);
ok
(
count
==
0
,
"expected 0 certs, got %
l
d
\n
"
,
count
);
count
=
0
;
crl
=
NULL
;
do
{
...
...
@@ -630,13 +630,13 @@ static void test_crypt_ui_wiz_import(void)
if
(
crl
)
count
++
;
}
while
(
crl
);
ok
(
count
==
1
,
"expected 1 CRL, got %d
\n
"
,
count
);
ok
(
count
==
1
,
"expected 1 CRL, got %
l
d
\n
"
,
count
);
}
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CERT
,
0
,
NULL
,
&
info
,
store
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
"expected E_INVALIDARG, got %08
l
x
\n
"
,
GetLastError
());
CertCloseStore
(
store
,
0
);
CertCloseStore
(
info
.
u
.
hCertStore
,
0
);
...
...
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