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
03d76d97
Commit
03d76d97
authored
Aug 30, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Aug 31, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Correct combining trust status of a chain's elements into the chain's trust status.
parent
c39696eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
chain.c
dlls/crypt32/chain.c
+15
-8
No files found.
dlls/crypt32/chain.c
View file @
03d76d97
...
...
@@ -262,6 +262,17 @@ static PCCERT_CONTEXT CRYPT_GetIssuerFromStore(HCERTSTORE store,
return
CertGetIssuerCertificateFromStore
(
store
,
cert
,
NULL
,
pdwFlags
);
}
static
inline
void
CRYPT_CombineTrustStatus
(
CERT_TRUST_STATUS
*
chainStatus
,
CERT_TRUST_STATUS
*
elementStatus
)
{
/* Any error that applies to an element also applies to a chain.. */
chainStatus
->
dwErrorStatus
|=
elementStatus
->
dwErrorStatus
;
/* but the bottom nibble of an element's info status doesn't apply to the
* chain.
*/
chainStatus
->
dwInfoStatus
|=
(
elementStatus
->
dwInfoStatus
&
0xfffffff0
);
}
static
BOOL
CRYPT_AddCertToSimpleChain
(
PCertificateChainEngine
engine
,
PCERT_SIMPLE_CHAIN
chain
,
PCCERT_CONTEXT
cert
,
DWORD
dwFlags
)
{
...
...
@@ -307,10 +318,8 @@ static BOOL CRYPT_AddCertToSimpleChain(PCertificateChainEngine engine,
chain
->
rgpElement
[
chain
->
cElement
++
]
=
element
;
if
(
chain
->
cElement
%
engine
->
CycleDetectionModulus
)
CRYPT_CheckSimpleChainForCycles
(
chain
);
chain
->
TrustStatus
.
dwErrorStatus
|=
element
->
TrustStatus
.
dwErrorStatus
;
chain
->
TrustStatus
.
dwInfoStatus
|=
element
->
TrustStatus
.
dwInfoStatus
;
CRYPT_CombineTrustStatus
(
&
chain
->
TrustStatus
,
&
element
->
TrustStatus
);
ret
=
TRUE
;
}
else
...
...
@@ -412,10 +421,8 @@ static BOOL CRYPT_BuildSimpleChain(HCERTCHAINENGINE hChainEngine,
}
CRYPT_CheckTrustedStatus
(
engine
->
hRoot
,
rootElement
);
}
chain
->
TrustStatus
.
dwErrorStatus
|=
rootElement
->
TrustStatus
.
dwErrorStatus
;
chain
->
TrustStatus
.
dwInfoStatus
|=
rootElement
->
TrustStatus
.
dwInfoStatus
&
~
CERT_TRUST_IS_SELF_SIGNED
;
CRYPT_CombineTrustStatus
(
&
chain
->
TrustStatus
,
&
rootElement
->
TrustStatus
);
}
if
(
!
ret
)
{
...
...
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