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
c20a617a
Commit
c20a617a
authored
Sep 27, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Sep 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Use helper function for setting confidence in SoftpubCheckCert.
parent
cc3a94f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
27 deletions
+17
-27
softpub.c
dlls/wintrust/softpub.c
+17
-27
No files found.
dlls/wintrust/softpub.c
View file @
c20a617a
...
...
@@ -501,6 +501,20 @@ HRESULT WINAPI SoftpubLoadSignature(CRYPT_PROVIDER_DATA *data)
return
ret
?
S_OK
:
S_FALSE
;
}
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
;
}
BOOL
WINAPI
SoftpubCheckCert
(
CRYPT_PROVIDER_DATA
*
data
,
DWORD
idxSigner
,
BOOL
fCounterSignerChain
,
DWORD
idxCounterSigner
)
{
...
...
@@ -524,19 +538,9 @@ BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner,
for
(
i
=
0
;
i
<
simpleChain
->
cElement
;
i
++
)
{
/* Set confidence */
data
->
pasSigners
[
idxSigner
].
pasCertChain
[
i
].
dwConfidence
=
0
;
if
(
!
(
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwErrorStatus
&
CERT_TRUST_IS_NOT_TIME_VALID
))
data
->
pasSigners
[
idxSigner
].
pasCertChain
[
i
].
dwConfidence
|=
CERT_CONFIDENCE_TIME
;
if
(
!
(
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwErrorStatus
&
CERT_TRUST_IS_NOT_TIME_NESTED
))
data
->
pasSigners
[
idxSigner
].
pasCertChain
[
i
].
dwConfidence
|=
CERT_CONFIDENCE_TIMENEST
;
if
(
!
(
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwErrorStatus
&
CERT_TRUST_IS_NOT_SIGNATURE_VALID
))
data
->
pasSigners
[
idxSigner
].
pasCertChain
[
i
].
dwConfidence
|=
CERT_CONFIDENCE_SIG
;
data
->
pasSigners
[
idxSigner
].
pasCertChain
[
i
].
dwConfidence
=
WINTRUST_TrustStatusToConfidence
(
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwErrorStatus
);
/* Set additional flags */
if
(
!
(
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwErrorStatus
&
CERT_TRUST_IS_UNTRUSTED_ROOT
))
...
...
@@ -552,20 +556,6 @@ 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
DWORD
WINTRUST_TrustStatusToError
(
DWORD
errorStatus
)
{
DWORD
error
;
...
...
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