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
a9dbc17d
Commit
a9dbc17d
authored
Sep 22, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Sep 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Store the error status and confidence for each element in the chain.
parent
49fdba47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
softpub.c
dlls/wintrust/softpub.c
+26
-0
No files found.
dlls/wintrust/softpub.c
View file @
a9dbc17d
...
...
@@ -552,6 +552,20 @@ BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner,
return
ret
;
}
static
DWORD
WINTRUST_TrustStatusToConfidence
(
DWORD
errorStatus
)
{
DWORD
confidence
=
0
;
confidence
=
0
;
if
(
!
(
errorStatus
&
CERT_TRUST_IS_NOT_SIGNATURE_VALID
))
confidence
|=
CERT_CONFIDENCE_SIG
;
if
(
!
(
errorStatus
&
CERT_TRUST_IS_NOT_TIME_VALID
))
confidence
|=
CERT_CONFIDENCE_TIME
;
if
(
!
(
errorStatus
&
CERT_TRUST_IS_NOT_TIME_NESTED
))
confidence
|=
CERT_CONFIDENCE_TIMENEST
;
return
confidence
;
}
static
BOOL
WINTRUST_CopyChain
(
CRYPT_PROVIDER_DATA
*
data
,
DWORD
signerIdx
)
{
BOOL
ret
;
...
...
@@ -559,6 +573,11 @@ static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
data
->
pasSigners
[
signerIdx
].
pChainContext
->
rgpChain
[
0
];
DWORD
i
;
data
->
pasSigners
[
signerIdx
].
pasCertChain
[
0
].
dwConfidence
=
WINTRUST_TrustStatusToConfidence
(
simpleChain
->
rgpElement
[
0
]
->
TrustStatus
.
dwErrorStatus
);
data
->
pasSigners
[
signerIdx
].
pasCertChain
[
0
].
dwError
=
simpleChain
->
rgpElement
[
0
]
->
TrustStatus
.
dwErrorStatus
;
data
->
pasSigners
[
signerIdx
].
pasCertChain
[
0
].
pChainElement
=
simpleChain
->
rgpElement
[
0
];
ret
=
TRUE
;
...
...
@@ -567,8 +586,15 @@ static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
ret
=
data
->
psPfns
->
pfnAddCert2Chain
(
data
,
signerIdx
,
FALSE
,
0
,
simpleChain
->
rgpElement
[
i
]
->
pCertContext
);
if
(
ret
)
{
data
->
pasSigners
[
signerIdx
].
pasCertChain
[
i
].
pChainElement
=
simpleChain
->
rgpElement
[
i
];
data
->
pasSigners
[
signerIdx
].
pasCertChain
[
i
].
dwConfidence
=
WINTRUST_TrustStatusToConfidence
(
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwErrorStatus
);
data
->
pasSigners
[
signerIdx
].
pasCertChain
[
i
].
dwError
=
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwErrorStatus
;
}
}
return
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