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
2f5ad179
Commit
2f5ad179
authored
Sep 30, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Oct 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Initialize CRYPT_PROVIDER_SIGSTATE structure in Softpub provider.
parent
60712059
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
softpub.c
dlls/wintrust/softpub.c
+28
-4
softpub.c
dlls/wintrust/tests/softpub.c
+1
-1
No files found.
dlls/wintrust/softpub.c
View file @
2f5ad179
...
...
@@ -832,14 +832,32 @@ static DWORD WINTRUST_VerifySigner(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
HRESULT
WINAPI
SoftpubLoadSignature
(
CRYPT_PROVIDER_DATA
*
data
)
{
DWORD
err
;
DWORD
err
=
ERROR_SUCCESS
;
TRACE
(
"(%p)
\n
"
,
data
);
if
(
!
data
->
padwTrustStepErrors
)
return
S_FALSE
;
if
(
data
->
hMsg
)
if
(
data
->
pSigState
)
{
/* We did not initialize this, probably an unsupported usage. */
FIXME
(
"pSigState %p already initialized.
\n
"
,
data
->
pSigState
);
}
if
(
!
(
data
->
pSigState
=
data
->
psPfns
->
pfnAlloc
(
sizeof
(
*
data
->
pSigState
))))
{
err
=
ERROR_OUTOFMEMORY
;
}
else
{
data
->
pSigState
->
cbStruct
=
sizeof
(
*
data
->
pSigState
);
data
->
pSigState
->
fSupportMultiSig
=
TRUE
;
data
->
pSigState
->
dwCryptoPolicySupport
=
WSS_SIGTRUST_SUPPORT
|
WSS_OBJTRUST_SUPPORT
|
WSS_CERTTRUST_SUPPORT
;
if
(
data
->
hMsg
)
data
->
pSigState
->
hPrimarySig
=
CryptMsgDuplicate
(
data
->
hMsg
);
}
if
(
!
err
&&
data
->
hMsg
)
{
DWORD
signerCount
,
size
;
...
...
@@ -859,8 +877,7 @@ HRESULT WINAPI SoftpubLoadSignature(CRYPT_PROVIDER_DATA *data)
else
err
=
TRUST_E_NOSIGNATURE
;
}
else
err
=
ERROR_SUCCESS
;
if
(
err
)
data
->
padwTrustStepErrors
[
TRUSTERROR_STEP_FINAL_SIGPROV
]
=
err
;
return
!
err
?
S_OK
:
S_FALSE
;
...
...
@@ -1375,6 +1392,13 @@ HRESULT WINAPI SoftpubCleanup(CRYPT_PROVIDER_DATA *data)
data
->
psPfns
->
pfnFree
(
data
->
u
.
pPDSip
->
psIndirectData
);
}
if
(
WVT_ISINSTRUCT
(
CRYPT_PROVIDER_DATA
,
data
->
cbStruct
,
pSigState
)
&&
data
->
pSigState
)
{
CryptMsgClose
(
data
->
pSigState
->
hPrimarySig
);
for
(
i
=
0
;
i
<
data
->
pSigState
->
cSecondarySigs
;
++
i
)
CryptMsgClose
(
data
->
pSigState
->
rhSecondarySigs
[
i
]);
data
->
psPfns
->
pfnFree
(
data
->
pSigState
);
}
CryptMsgClose
(
data
->
hMsg
);
if
(
data
->
fOpenedFile
&&
...
...
dlls/wintrust/tests/softpub.c
View file @
2f5ad179
...
...
@@ -1831,7 +1831,7 @@ static void test_multiple_signatures(void)
ok
(
prov
->
cbStruct
==
sizeof
(
*
prov
),
"Got size %lu.
\n
"
,
prov
->
cbStruct
);
ok
(
prov
->
csSigners
==
1
,
"Got %lu.
\n
"
,
prov
->
csSigners
);
todo_wine
ok
(
prov
->
pSigSettings
==
&
settings
,
"Got %p, expected %p.
\n
"
,
prov
->
pSigSettings
,
&
settings
);
todo_wine
ok
(
!!
prov
->
pSigState
,
"Got %p, expected %p.
\n
"
,
prov
->
pSigSettings
,
&
settings
);
ok
(
!!
prov
->
pSigState
,
"Got %p, expected %p.
\n
"
,
prov
->
pSigSettings
,
&
settings
);
if
(
prov
->
cbStruct
==
sizeof
(
*
prov
)
&&
prov
->
pSigState
)
{
ok
(
prov
->
pSigState
->
cbStruct
==
sizeof
(
*
prov
->
pSigState
)
...
...
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