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
6e89a614
Commit
6e89a614
authored
Oct 06, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Oct 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Test OpenSSL chain separately to address test failures on Win98.
parent
251ccfc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
6 deletions
+51
-6
chain.c
dlls/crypt32/tests/chain.c
+51
-6
No files found.
dlls/crypt32/tests/chain.c
View file @
6e89a614
...
...
@@ -3257,6 +3257,21 @@ static const SimpleChainStatusCheck opensslSimpleStatus[] = {
{
sizeof
(
opensslElementStatus
)
/
sizeof
(
opensslElementStatus
[
0
]),
opensslElementStatus
},
};
/* The OpenSSL chain may not have its root trusted, in which case the chain
* is truncated (on Win98).
*/
static
CONST_DATA_BLOB
incompleteOpensslChain
[]
=
{
{
sizeof
(
global_sign_ca
),
global_sign_ca
},
{
sizeof
(
openssl_org
),
openssl_org
},
};
static
const
CERT_TRUST_STATUS
incompleteOpensslElementStatus
[]
=
{
{
CERT_TRUST_IS_NOT_TIME_VALID
,
CERT_TRUST_HAS_KEY_MATCH_ISSUER
},
{
CERT_TRUST_NO_ERROR
,
CERT_TRUST_HAS_KEY_MATCH_ISSUER
},
};
static
const
SimpleChainStatusCheck
incompleteOpensslSimpleStatus
[]
=
{
{
sizeof
(
incompleteOpensslElementStatus
)
/
sizeof
(
incompleteOpensslElementStatus
[
0
]),
incompleteOpensslElementStatus
},
};
/* entrust_ca -> aaa_certificate_services -> cs_stanford_edu */
/* cs.stanford.edu's cert is only valid from 7/16/2009 to 7/16/2012, so with
* the date tested (October 2007) it's not time valid.
...
...
@@ -3515,12 +3530,6 @@ static ChainCheck chainCheck[] = {
CERT_TRUST_HAS_PREFERRED_ISSUER
},
{
CERT_TRUST_IS_NOT_TIME_VALID
,
0
},
1
,
googleSimpleStatus
},
0
},
/* The openssl chain may or may not have its root trusted, so ignore the error
*/
{
{
sizeof
(
opensslChain
)
/
sizeof
(
opensslChain
[
0
]),
opensslChain
},
{
{
CERT_TRUST_IS_UNTRUSTED_ROOT
,
CERT_TRUST_HAS_PREFERRED_ISSUER
},
{
CERT_TRUST_IS_NOT_TIME_VALID
,
0
},
1
,
opensslSimpleStatus
},
0
},
/* The stanford chain may or may not have its root trusted, so ignore the error
*/
{
{
sizeof
(
stanfordChain
)
/
sizeof
(
stanfordChain
[
0
]),
stanfordChain
},
...
...
@@ -3549,6 +3558,20 @@ static ChainCheck chainCheckNoStore[] = {
0
},
};
/* The openssl chain may or may not have its root trusted, so ignore the error
*/
static
ChainCheck
opensslChainCheck
=
{
{
sizeof
(
opensslChain
)
/
sizeof
(
opensslChain
[
0
]),
opensslChain
},
{
{
CERT_TRUST_IS_UNTRUSTED_ROOT
,
CERT_TRUST_HAS_PREFERRED_ISSUER
},
{
CERT_TRUST_IS_NOT_TIME_VALID
,
0
},
1
,
opensslSimpleStatus
},
0
};
static
ChainCheck
incompleteOpensslChainCheck
=
{
{
sizeof
(
incompleteOpensslChain
)
/
sizeof
(
incompleteOpensslChain
[
0
]),
incompleteOpensslChain
},
{
{
CERT_TRUST_IS_UNTRUSTED_ROOT
,
CERT_TRUST_HAS_PREFERRED_ISSUER
},
{
CERT_TRUST_IS_NOT_TIME_VALID
|
CERT_TRUST_IS_PARTIAL_CHAIN
,
0
},
1
,
incompleteOpensslSimpleStatus
},
0
};
/* Chain27 checks a certificate with a subject alternate name containing an
* embedded NULL. Newer crypt32 versions fail to decode such alternate names,
* correctly prohibiting them. Older crypt32 versions do not. Rather than
...
...
@@ -3722,6 +3745,28 @@ static void testGetCertChain(void)
pCertFreeCertificateChain
(
chain
);
}
}
chain
=
getChain
(
NULL
,
&
opensslChainCheck
.
certs
,
0
,
TRUE
,
&
oct2007
,
opensslChainCheck
.
todo
,
0
);
if
(
chain
)
{
ok
(
chain
->
TrustStatus
.
dwErrorStatus
==
opensslChainCheck
.
status
.
status
.
dwErrorStatus
||
broken
((
chain
->
TrustStatus
.
dwErrorStatus
&
~
incompleteOpensslChainCheck
.
status
.
statusToIgnore
.
dwErrorStatus
)
==
(
incompleteOpensslChainCheck
.
status
.
status
.
dwErrorStatus
&
~
incompleteOpensslChainCheck
.
status
.
statusToIgnore
.
dwErrorStatus
)),
"unexpected chain error status %08x
\n
"
,
chain
->
TrustStatus
.
dwErrorStatus
);
if
(
opensslChainCheck
.
status
.
status
.
dwErrorStatus
==
chain
->
TrustStatus
.
dwErrorStatus
)
checkChainStatus
(
chain
,
&
opensslChainCheck
.
status
,
opensslChainCheck
.
todo
,
"opensslChainCheck"
,
0
);
else
checkChainStatus
(
chain
,
&
incompleteOpensslChainCheck
.
status
,
incompleteOpensslChainCheck
.
todo
,
"incompleteOpensslChainCheck"
,
0
);
pCertFreeCertificateChain
(
chain
);
}
for
(
i
=
0
;
i
<
sizeof
(
chainCheckNoStore
)
/
sizeof
(
chainCheckNoStore
[
0
]);
i
++
)
{
...
...
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