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
6455674c
Commit
6455674c
authored
Oct 23, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Oct 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Separate loading a message from a WINTRUST_CERT_INFO into a helper function.
parent
92e88c3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
37 deletions
+44
-37
softpub.c
dlls/wintrust/softpub.c
+44
-37
No files found.
dlls/wintrust/softpub.c
View file @
6455674c
...
...
@@ -249,61 +249,68 @@ error:
return
ret
;
}
HRESULT
WINAPI
SoftpubLoad
Message
(
CRYPT_PROVIDER_DATA
*
data
)
static
BOOL
SOFTPUB_LoadCert
Message
(
CRYPT_PROVIDER_DATA
*
data
)
{
BOOL
ret
;
TRACE
(
"(%p)
\n
"
,
data
);
if
(
!
data
->
padwTrustStepErrors
)
return
S_FALSE
;
switch
(
data
->
pWintrustData
->
dwUnionChoice
)
if
(
data
->
pWintrustData
->
u
.
pCert
&&
data
->
pWintrustData
->
u
.
pCert
->
cbStruct
==
sizeof
(
WINTRUST_CERT_INFO
))
{
case
WTD_CHOICE_CERT
:
if
(
data
->
pWintrustData
->
u
.
pCert
&&
data
->
pWintrustData
->
u
.
pCert
->
cbStruct
==
sizeof
(
WINTRUST_CERT_INFO
))
if
(
data
->
psPfns
)
{
if
(
data
->
psPfns
)
CRYPT_PROVIDER_SGNR
signer
=
{
sizeof
(
signer
),
{
0
}
};
DWORD
i
;
/* Add a signer with nothing but the time to verify, so we can
* add a cert to it
*/
if
(
data
->
pWintrustData
->
u
.
pCert
->
psftVerifyAsOf
)
data
->
sftSystemTime
=
signer
.
sftVerifyAsOf
;
else
{
CRYPT_PROVIDER_SGNR
signer
=
{
sizeof
(
signer
),
{
0
}
};
DWORD
i
;
/* Add a signer with nothing but the time to verify, so we can
* add a cert to it
*/
if
(
data
->
pWintrustData
->
u
.
pCert
->
psftVerifyAsOf
)
data
->
sftSystemTime
=
signer
.
sftVerifyAsOf
;
else
{
SYSTEMTIME
sysTime
;
SYSTEMTIME
sysTime
;
GetSystemTime
(
&
sysTime
);
SystemTimeToFileTime
(
&
sysTime
,
&
signer
.
sftVerifyAsOf
);
}
ret
=
data
->
psPfns
->
pfnAddSgnr2Chain
(
data
,
FALSE
,
0
,
&
signer
);
if
(
!
ret
)
goto
error
;
GetSystemTime
(
&
sysTime
);
SystemTimeToFileTime
(
&
sysTime
,
&
signer
.
sftVerifyAsOf
);
}
ret
=
data
->
psPfns
->
pfnAddSgnr2Chain
(
data
,
FALSE
,
0
,
&
signer
);
if
(
ret
)
{
ret
=
data
->
psPfns
->
pfnAddCert2Chain
(
data
,
0
,
FALSE
,
0
,
data
->
pWintrustData
->
u
.
pCert
->
psCertContext
);
if
(
!
ret
)
goto
error
;
for
(
i
=
0
;
ret
&&
i
<
data
->
pWintrustData
->
u
.
pCert
->
chStores
;
i
++
)
ret
=
data
->
psPfns
->
pfnAddStore2Chain
(
data
,
data
->
pWintrustData
->
u
.
pCert
->
pahStores
[
i
]);
}
else
{
/* Do nothing!? See the tests */
ret
=
TRUE
;
}
}
else
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
=
FALS
E
;
/* Do nothing!? See the tests */
ret
=
TRU
E
;
}
}
else
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
=
FALSE
;
}
return
ret
;
}
HRESULT
WINAPI
SoftpubLoadMessage
(
CRYPT_PROVIDER_DATA
*
data
)
{
BOOL
ret
;
TRACE
(
"(%p)
\n
"
,
data
);
if
(
!
data
->
padwTrustStepErrors
)
return
S_FALSE
;
switch
(
data
->
pWintrustData
->
dwUnionChoice
)
{
case
WTD_CHOICE_CERT
:
ret
=
SOFTPUB_LoadCertMessage
(
data
);
break
;
case
WTD_CHOICE_FILE
:
if
(
!
data
->
pWintrustData
->
u
.
pFile
)
...
...
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