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
cb341f37
Commit
cb341f37
authored
Oct 08, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Oct 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix error handling for cyclic chains.
parent
742c1a37
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
chain.c
dlls/crypt32/chain.c
+10
-1
chain.c
dlls/crypt32/tests/chain.c
+2
-3
No files found.
dlls/crypt32/chain.c
View file @
cb341f37
...
...
@@ -251,7 +251,7 @@ static void CRYPT_CheckSimpleChainForCycles(PCERT_SIMPLE_CHAIN chain)
if
(
cyclicCertIndex
)
{
chain
->
rgpElement
[
cyclicCertIndex
]
->
TrustStatus
.
dwErrorStatus
|=
CERT_TRUST_IS_CYCLIC
;
|=
CERT_TRUST_IS_CYCLIC
|
CERT_TRUST_INVALID_BASIC_CONSTRAINTS
;
/* Release remaining certs */
for
(
i
=
cyclicCertIndex
+
1
;
i
<
chain
->
cElement
;
i
++
)
CRYPT_FreeChainElement
(
chain
->
rgpElement
[
i
]);
...
...
@@ -766,6 +766,15 @@ static void CRYPT_CheckSimpleChain(PCertificateChainEngine engine,
constraints
.
dwPathLenConstraint
--
;
}
}
if
(
CRYPT_IsSimpleChainCyclic
(
chain
))
{
/* If the chain is cyclic, then the path length constraints
* are violated, because the chain is infinitely long.
*/
pathLengthConstraintViolated
=
TRUE
;
chain
->
TrustStatus
.
dwErrorStatus
|=
CERT_TRUST_INVALID_BASIC_CONSTRAINTS
;
}
/* FIXME: check valid usages */
CRYPT_CombineTrustStatus
(
&
chain
->
TrustStatus
,
&
chain
->
rgpElement
[
i
]
->
TrustStatus
);
...
...
dlls/crypt32/tests/chain.c
View file @
cb341f37
...
...
@@ -1521,7 +1521,7 @@ static ChainCheck chainCheck[] = {
{
CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT
|
CERT_TRUST_INVALID_BASIC_CONSTRAINTS
|
CERT_TRUST_IS_CYCLIC
,
0
},
1
,
simpleStatus9
},
TODO_
ERROR
|
TODO_
INFO
},
TODO_INFO
},
{
{
sizeof
(
chain10
)
/
sizeof
(
chain10
[
0
]),
chain10
},
{
{
0
,
CERT_TRUST_HAS_PREFERRED_ISSUER
},
{
CERT_TRUST_IS_UNTRUSTED_ROOT
,
0
},
1
,
simpleStatus10
},
0
},
...
...
@@ -1743,8 +1743,7 @@ static ChainPolicyCheck basicConstraintsPolicyCheck[] = {
{
0
,
TRUST_E_BASIC_CONSTRAINTS
,
0
,
1
,
NULL
},
TODO_ERROR
|
TODO_CHAINS
|
TODO_ELEMENTS
},
{
{
sizeof
(
chain9
)
/
sizeof
(
chain9
[
0
]),
chain9
},
{
0
,
TRUST_E_BASIC_CONSTRAINTS
,
0
,
1
,
NULL
},
TODO_ERROR
|
TODO_CHAINS
|
TODO_ELEMENTS
},
{
0
,
TRUST_E_BASIC_CONSTRAINTS
,
0
,
1
,
NULL
},
0
},
{
{
sizeof
(
chain10
)
/
sizeof
(
chain10
[
0
]),
chain10
},
{
0
,
0
,
-
1
,
-
1
,
NULL
},
0
},
{
{
sizeof
(
chain11
)
/
sizeof
(
chain11
[
0
]),
chain11
},
...
...
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