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
cab0c5a5
Commit
cab0c5a5
authored
Oct 08, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Oct 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Add a helper function to create a chain for a signer.
parent
1a88c8bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
29 deletions
+38
-29
softpub.c
dlls/wintrust/softpub.c
+38
-29
No files found.
dlls/wintrust/softpub.c
View file @
cab0c5a5
...
@@ -597,53 +597,62 @@ static void WINTRUST_CreateChainPolicyCreateInfo(
...
@@ -597,53 +597,62 @@ static void WINTRUST_CreateChainPolicyCreateInfo(
info
->
pvReserved
=
NULL
;
info
->
pvReserved
=
NULL
;
}
}
HRESULT
WINAPI
WintrustCertificateTrust
(
CRYPT_PROVIDER_DATA
*
data
)
static
BOOL
WINTRUST_CreateChainForSigner
(
CRYPT_PROVIDER_DATA
*
data
,
DWORD
signer
,
PWTD_GENERIC_CHAIN_POLICY_CREATE_INFO
createInfo
,
PCERT_CHAIN_PARA
chainPara
)
{
{
BOOL
ret
;
BOOL
ret
=
TRUE
;
if
(
!
data
->
csSigners
)
{
ret
=
FALSE
;
SetLastError
(
TRUST_E_NOSIGNATURE
);
}
else
{
DWORD
i
;
WTD_GENERIC_CHAIN_POLICY_CREATE_INFO
createInfo
;
CERT_CHAIN_PARA
chainPara
;
WINTRUST_CreateChainPolicyCreateInfo
(
data
,
&
createInfo
,
&
chainPara
);
/* Expect the end certificate for each signer to be the only cert in the
ret
=
TRUE
;
* chain:
for
(
i
=
0
;
i
<
data
->
csSigners
;
i
++
)
{
/* Expect the end certificate for each signer to be the only
* cert in the chain:
*/
*/
if
(
data
->
pasSigners
[
i
].
csCertChain
)
if
(
data
->
pasSigners
[
signer
].
csCertChain
)
{
{
/* Create a certificate chain for each signer */
/* Create a certificate chain for each signer */
ret
=
CertGetCertificateChain
(
createInfo
.
hChainEngine
,
ret
=
CertGetCertificateChain
(
createInfo
->
hChainEngine
,
data
->
pasSigners
[
i
].
pasCertChain
[
0
].
pCert
,
data
->
pasSigners
[
signer
].
pasCertChain
[
0
].
pCert
,
&
data
->
pasSigners
[
i
].
sftVerifyAsOf
,
&
data
->
pasSigners
[
signer
].
sftVerifyAsOf
,
data
->
chStores
?
data
->
pahStores
[
0
]
:
NULL
,
data
->
chStores
?
data
->
pahStores
[
0
]
:
NULL
,
&
chainPara
,
createInfo
.
dwFlags
,
createInfo
.
pvReserved
,
chainPara
,
createInfo
->
dwFlags
,
createInfo
->
pvReserved
,
&
data
->
pasSigners
[
i
].
pChainContext
);
&
data
->
pasSigners
[
signer
].
pChainContext
);
if
(
ret
)
if
(
ret
)
{
{
if
(
data
->
pasSigners
[
i
].
pChainContext
->
cChain
!=
1
)
if
(
data
->
pasSigners
[
signer
].
pChainContext
->
cChain
!=
1
)
{
{
FIXME
(
"unimplemented for more than 1 simple chain
\n
"
);
FIXME
(
"unimplemented for more than 1 simple chain
\n
"
);
ret
=
FALSE
;
ret
=
FALSE
;
}
}
else
else
{
{
if
((
ret
=
WINTRUST_CopyChain
(
data
,
i
)))
if
((
ret
=
WINTRUST_CopyChain
(
data
,
signer
)))
ret
=
data
->
psPfns
->
pfnCertCheckPolicy
(
data
,
i
,
ret
=
data
->
psPfns
->
pfnCertCheckPolicy
(
data
,
signer
,
FALSE
,
FALSE
,
0
);
0
);
}
}
}
}
}
}
return
ret
;
}
HRESULT
WINAPI
WintrustCertificateTrust
(
CRYPT_PROVIDER_DATA
*
data
)
{
BOOL
ret
;
if
(
!
data
->
csSigners
)
{
ret
=
FALSE
;
SetLastError
(
TRUST_E_NOSIGNATURE
);
}
}
else
{
DWORD
i
;
WTD_GENERIC_CHAIN_POLICY_CREATE_INFO
createInfo
;
CERT_CHAIN_PARA
chainPara
;
WINTRUST_CreateChainPolicyCreateInfo
(
data
,
&
createInfo
,
&
chainPara
);
ret
=
TRUE
;
for
(
i
=
0
;
i
<
data
->
csSigners
;
i
++
)
ret
=
WINTRUST_CreateChainForSigner
(
data
,
i
,
&
createInfo
,
&
chainPara
);
}
}
if
(
!
ret
)
if
(
!
ret
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]
=
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]
=
...
...
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