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
428fc179
Commit
428fc179
authored
Jan 27, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Jan 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Return error directly from WINTRUST_CreateChainForSigner.
parent
711ca0f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
26 deletions
+23
-26
softpub.c
dlls/wintrust/softpub.c
+23
-26
No files found.
dlls/wintrust/softpub.c
View file @
428fc179
...
...
@@ -753,11 +753,11 @@ static void WINTRUST_CreateChainPolicyCreateInfo(
info
->
pvReserved
=
NULL
;
}
static
BOOL
WINTRUST_CreateChainForSigner
(
CRYPT_PROVIDER_DATA
*
data
,
static
DWORD
WINTRUST_CreateChainForSigner
(
CRYPT_PROVIDER_DATA
*
data
,
DWORD
signer
,
PWTD_GENERIC_CHAIN_POLICY_CREATE_INFO
createInfo
,
PCERT_CHAIN_PARA
chainPara
)
{
BOOL
ret
=
TRUE
;
DWORD
err
=
ERROR_SUCCESS
;
HCERTSTORE
store
=
NULL
;
if
(
data
->
chStores
)
...
...
@@ -772,15 +772,17 @@ static BOOL WINTRUST_CreateChainForSigner(CRYPT_PROVIDER_DATA *data,
CertAddStoreToCollection
(
store
,
data
->
pahStores
[
i
],
0
,
0
);
}
else
ret
=
FALSE
;
err
=
GetLastError
()
;
}
if
(
ret
)
if
(
!
err
)
{
/* Expect the end certificate for each signer to be the only cert in
* the chain:
*/
if
(
data
->
pasSigners
[
signer
].
csCertChain
)
{
BOOL
ret
;
/* Create a certificate chain for each signer */
ret
=
CertGetCertificateChain
(
createInfo
->
hChainEngine
,
data
->
pasSigners
[
signer
].
pasCertChain
[
0
].
pCert
,
...
...
@@ -792,45 +794,41 @@ static BOOL WINTRUST_CreateChainForSigner(CRYPT_PROVIDER_DATA *data,
if
(
data
->
pasSigners
[
signer
].
pChainContext
->
cChain
!=
1
)
{
FIXME
(
"unimplemented for more than 1 simple chain
\n
"
);
ret
=
FALSE
;
err
=
E_NOTIMPL
;
}
else
{
DWORD
err
;
if
(
!
(
err
=
WINTRUST_CopyChain
(
data
,
signer
)))
{
if
(
data
->
psPfns
->
pfnCertCheckPolicy
)
{
ret
=
data
->
psPfns
->
pfnCertCheckPolicy
(
data
,
signer
,
FALSE
,
0
);
if
(
!
ret
)
err
=
GetLastError
();
}
else
TRACE
(
"no cert check policy, skipping policy check
\n
"
);
}
else
{
SetLastError
(
err
);
ret
=
FALSE
;
}
}
}
else
err
=
GetLastError
();
}
CertCloseStore
(
store
,
0
);
}
return
ret
;
return
err
;
}
HRESULT
WINAPI
WintrustCertificateTrust
(
CRYPT_PROVIDER_DATA
*
data
)
{
BOOL
ret
;
DWORD
err
;
TRACE
(
"(%p)
\n
"
,
data
);
if
(
!
data
->
csSigners
)
{
ret
=
FALSE
;
SetLastError
(
TRUST_E_NOSIGNATURE
);
}
err
=
TRUST_E_NOSIGNATURE
;
else
{
DWORD
i
;
...
...
@@ -838,17 +836,16 @@ HRESULT WINAPI WintrustCertificateTrust(CRYPT_PROVIDER_DATA *data)
CERT_CHAIN_PARA
chainPara
;
WINTRUST_CreateChainPolicyCreateInfo
(
data
,
&
createInfo
,
&
chainPara
);
ret
=
TRUE
;
for
(
i
=
0
;
i
<
data
->
csSigners
;
i
++
)
ret
=
WINTRUST_CreateChainForSigner
(
data
,
i
,
&
createInfo
,
err
=
ERROR_SUCCESS
;
for
(
i
=
0
;
!
err
&&
i
<
data
->
csSigners
;
i
++
)
err
=
WINTRUST_CreateChainForSigner
(
data
,
i
,
&
createInfo
,
&
chainPara
);
}
if
(
!
ret
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]
=
GetLastError
();
TRACE
(
"returning %d (%08x)
\n
"
,
ret
?
S_OK
:
S_FALSE
,
if
(
err
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]
=
err
;
TRACE
(
"returning %d (%08x)
\n
"
,
!
err
?
S_OK
:
S_FALSE
,
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_CERTPROV
]);
return
ret
?
S_OK
:
S_FALSE
;
return
!
err
?
S_OK
:
S_FALSE
;
}
HRESULT
WINAPI
GenericChainCertificateTrust
(
CRYPT_PROVIDER_DATA
*
data
)
...
...
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