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
f1796209
Commit
f1796209
authored
Dec 22, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Dec 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptui: Test mismatches between allowed and given types in CryptUIWizImport.
parent
a04afe7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
cryptui.c
dlls/cryptui/tests/cryptui.c
+26
-0
No files found.
dlls/cryptui/tests/cryptui.c
View file @
f1796209
...
...
@@ -283,6 +283,12 @@ static const BYTE iTunesCert3[] = {
0xd3
,
0x9c
,
0x6e
,
0xc1
,
0x9c
,
0xac
,
0x74
,
0x3d
,
0x77
,
0x06
,
0x5e
,
0x28
,
0x28
,
0x5c
,
0xf5
,
0xe0
,
0x9c
,
0x19
,
0xd8
,
0xba
,
0x74
,
0x81
,
0x2d
,
0x67
,
0x77
,
0x93
,
0x8d
,
0xbf
,
0xd2
,
0x52
,
0x00
,
0xe6
,
0xa5
,
0x38
,
0x4e
,
0x2e
,
0x73
,
0x66
,
0x7a
};
static
const
BYTE
signedCRL
[]
=
{
0x30
,
0x45
,
0x30
,
0x2c
,
0x30
,
0x02
,
0x06
,
0x00
,
0x30
,
0x15
,
0x31
,
0x13
,
0x30
,
0x11
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x13
,
0x0a
,
0x4a
,
0x75
,
0x61
,
0x6e
,
0x20
,
0x4c
,
0x61
,
0x6e
,
0x67
,
0x00
,
0x18
,
0x0f
,
0x31
,
0x36
,
0x30
,
0x31
,
0x30
,
0x31
,
0x30
,
0x31
,
0x30
,
0x30
,
0x30
,
0x30
,
0x30
,
0x30
,
0x5a
,
0x30
,
0x02
,
0x06
,
0x00
,
0x03
,
0x11
,
0x00
,
0x0f
,
0x0e
,
0x0d
,
0x0c
,
0x0b
,
0x0a
,
0x09
,
0x08
,
0x07
,
0x06
,
0x05
,
0x04
,
0x03
,
0x02
,
0x01
,
0x00
};
/* CBT hook to ensure a window (e.g., MessageBox) cannot be created */
static
HHOOK
hook
;
...
...
@@ -362,9 +368,29 @@ static void test_crypt_ui_wiz_import(void)
0
,
NULL
,
&
info
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
/* Check allowed vs. given type mismatches */
info
.
u
.
pCertContext
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
v1CertWithValidPubKey
,
sizeof
(
v1CertWithValidPubKey
));
SetLastError
(
0xdeadbeef
);
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
|
CRYPTUI_WIZ_IMPORT_ALLOW_CRL
,
0
,
NULL
,
&
info
,
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
CertFreeCertificateContext
(
info
.
u
.
pCertContext
);
info
.
dwSubjectChoice
=
CRYPTUI_WIZ_IMPORT_SUBJECT_CRL_CONTEXT
;
info
.
u
.
pCRLContext
=
CertCreateCRLContext
(
X509_ASN_ENCODING
,
signedCRL
,
sizeof
(
signedCRL
));
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
());
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.
*/
info
.
dwSubjectChoice
=
CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_CONTEXT
;
info
.
u
.
pCertContext
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
v1CertWithValidPubKey
,
sizeof
(
v1CertWithValidPubKey
));
ret
=
pCryptUIWizImport
(
CRYPTUI_WIZ_NO_UI
,
0
,
NULL
,
&
info
,
NULL
);
...
...
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