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
f3ba89f9
Commit
f3ba89f9
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: Use helper function to add the trust steps to execute.
parent
a74aab75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
25 deletions
+38
-25
wintrust_main.c
dlls/wintrust/wintrust_main.c
+38
-25
No files found.
dlls/wintrust/wintrust_main.c
View file @
f3ba89f9
...
...
@@ -125,6 +125,42 @@ oom:
return
NULL
;
}
/* Adds trust steps for each function in psPfns. Assumes steps has at least
* 5 entries. Returns the number of steps added.
*/
static
DWORD
WINTRUST_AddTrustStepsFromFunctions
(
struct
wintrust_step
*
steps
,
const
CRYPT_PROVIDER_FUNCTIONS
*
psPfns
)
{
DWORD
numSteps
=
0
;
if
(
psPfns
->
pfnInitialize
)
{
steps
[
numSteps
].
func
=
psPfns
->
pfnInitialize
;
steps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_WVTINIT
;
}
if
(
psPfns
->
pfnObjectTrust
)
{
steps
[
numSteps
].
func
=
psPfns
->
pfnObjectTrust
;
steps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_OBJPROV
;
}
if
(
psPfns
->
pfnSignatureTrust
)
{
steps
[
numSteps
].
func
=
psPfns
->
pfnSignatureTrust
;
steps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_SIGPROV
;
}
if
(
psPfns
->
pfnCertificateTrust
)
{
steps
[
numSteps
].
func
=
psPfns
->
pfnCertificateTrust
;
steps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_CERTPROV
;
}
if
(
psPfns
->
pfnFinalPolicy
)
{
steps
[
numSteps
].
func
=
psPfns
->
pfnFinalPolicy
;
steps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_POLICYPROV
;
}
return
numSteps
;
}
static
LONG
WINTRUST_DefaultVerify
(
HWND
hwnd
,
GUID
*
actionID
,
WINTRUST_DATA
*
data
)
{
...
...
@@ -155,31 +191,8 @@ static LONG WINTRUST_DefaultVerify(HWND hwnd, GUID *actionID,
provData
->
pgActionID
=
actionID
;
WintrustGetRegPolicyFlags
(
&
provData
->
dwRegPolicySettings
);
if
(
provData
->
psPfns
->
pfnInitialize
)
{
verifySteps
[
numSteps
].
func
=
provData
->
psPfns
->
pfnInitialize
;
verifySteps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_WVTINIT
;
}
if
(
provData
->
psPfns
->
pfnObjectTrust
)
{
verifySteps
[
numSteps
].
func
=
provData
->
psPfns
->
pfnObjectTrust
;
verifySteps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_OBJPROV
;
}
if
(
provData
->
psPfns
->
pfnSignatureTrust
)
{
verifySteps
[
numSteps
].
func
=
provData
->
psPfns
->
pfnSignatureTrust
;
verifySteps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_SIGPROV
;
}
if
(
provData
->
psPfns
->
pfnCertificateTrust
)
{
verifySteps
[
numSteps
].
func
=
provData
->
psPfns
->
pfnCertificateTrust
;
verifySteps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_CERTPROV
;
}
if
(
provData
->
psPfns
->
pfnFinalPolicy
)
{
verifySteps
[
numSteps
].
func
=
provData
->
psPfns
->
pfnFinalPolicy
;
verifySteps
[
numSteps
++
].
error_index
=
TRUSTERROR_STEP_FINAL_POLICYPROV
;
}
numSteps
=
WINTRUST_AddTrustStepsFromFunctions
(
verifySteps
,
provData
->
psPfns
);
err
=
WINTRUST_ExecuteSteps
(
verifySteps
,
numSteps
,
provData
);
goto
done
;
...
...
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