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
1b87f222
Commit
1b87f222
authored
Nov 12, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Make helper for copying CMSG_CMS_SIGNER_INFO attributes more generic.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
18640435
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
msg.c
dlls/crypt32/msg.c
+6
-11
No files found.
dlls/crypt32/msg.c
View file @
1b87f222
...
...
@@ -2995,15 +2995,14 @@ static BOOL CDecodeEnvelopedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
return
ret
;
}
static
BOOL
CRYPT_CopyUnauthAttr
(
void
*
pvData
,
DWORD
*
pcbData
,
const
CMSG_CMS_SIGNER_INFO
*
in
)
static
BOOL
CRYPT_CopyAttr
(
void
*
pvData
,
DWORD
*
pcbData
,
const
CRYPT_ATTRIBUTES
*
attr
)
{
DWORD
size
;
BOOL
ret
;
TRACE
(
"(%p, %d, %p)
\n
"
,
pvData
,
pvData
?
*
pcbData
:
0
,
in
);
TRACE
(
"(%p, %d, %p)
\n
"
,
pvData
,
pvData
?
*
pcbData
:
0
,
attr
);
size
=
CRYPT_SizeOfAttributes
(
&
in
->
UnauthAttrs
);
size
=
CRYPT_SizeOfAttributes
(
attr
);
if
(
!
pvData
)
{
*
pcbData
=
size
;
...
...
@@ -3016,12 +3015,8 @@ static BOOL CRYPT_CopyUnauthAttr(void *pvData, DWORD *pcbData,
ret
=
FALSE
;
}
else
{
CRYPT_ATTRIBUTES
*
out
=
pvData
;
ret
=
CRYPT_ConstructAttributes
(
pvData
,
attr
);
CRYPT_ConstructAttributes
(
out
,
&
in
->
UnauthAttrs
);
ret
=
TRUE
;
}
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -3205,8 +3200,8 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
if
(
dwIndex
>=
msg
->
u
.
signed_data
.
info
->
cSignerInfo
)
SetLastError
(
CRYPT_E_INVALID_INDEX
);
else
ret
=
CRYPT_Copy
Unauth
Attr
(
pvData
,
pcbData
,
&
msg
->
u
.
signed_data
.
info
->
rgSignerInfo
[
dwIndex
]);
ret
=
CRYPT_CopyAttr
(
pvData
,
pcbData
,
&
msg
->
u
.
signed_data
.
info
->
rgSignerInfo
[
dwIndex
]
.
UnauthAttrs
);
}
else
SetLastError
(
CRYPT_E_INVALID_MSG_TYPE
);
...
...
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