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
937b27f3
Commit
937b27f3
authored
Jul 23, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jul 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement getting outer content of a signed message.
parent
b80101eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
msg.c
dlls/crypt32/msg.c
+28
-0
msg.c
dlls/crypt32/tests/msg.c
+0
-4
No files found.
dlls/crypt32/msg.c
View file @
937b27f3
...
...
@@ -797,6 +797,34 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
switch
(
dwParamType
)
{
case
CMSG_CONTENT_PARAM
:
{
CRYPT_CONTENT_INFO
info
;
ret
=
CryptMsgGetParam
(
hCryptMsg
,
CMSG_BARE_CONTENT_PARAM
,
0
,
NULL
,
&
info
.
Content
.
cbData
);
if
(
ret
)
{
info
.
Content
.
pbData
=
CryptMemAlloc
(
info
.
Content
.
cbData
);
if
(
info
.
Content
.
pbData
)
{
ret
=
CryptMsgGetParam
(
hCryptMsg
,
CMSG_BARE_CONTENT_PARAM
,
0
,
info
.
Content
.
pbData
,
&
info
.
Content
.
cbData
);
if
(
ret
)
{
char
oid_rsa_signed
[]
=
szOID_RSA_signedData
;
info
.
pszObjId
=
oid_rsa_signed
;
ret
=
CryptEncodeObjectEx
(
X509_ASN_ENCODING
,
PKCS_CONTENT_INFO
,
&
info
,
0
,
NULL
,
pvData
,
pcbData
);
}
CryptMemFree
(
info
.
Content
.
pbData
);
}
else
ret
=
FALSE
;
}
break
;
}
case
CMSG_BARE_CONTENT_PARAM
:
{
CRYPT_SIGNED_INFO
info
;
...
...
dlls/crypt32/tests/msg.c
View file @
937b27f3
...
...
@@ -1292,7 +1292,6 @@ static void test_signed_msg_encoding(void)
check_param
(
"detached signed empty bare content"
,
msg
,
CMSG_BARE_CONTENT_PARAM
,
signedEmptyBareContent
,
sizeof
(
signedEmptyBareContent
));
todo_wine
check_param
(
"detached signed empty content"
,
msg
,
CMSG_CONTENT_PARAM
,
signedEmptyContent
,
sizeof
(
signedEmptyContent
));
ret
=
CryptMsgUpdate
(
msg
,
msgData
,
sizeof
(
msgData
),
TRUE
);
...
...
@@ -1301,7 +1300,6 @@ static void test_signed_msg_encoding(void)
signedHash
,
sizeof
(
signedHash
));
check_param
(
"detached signed bare content"
,
msg
,
CMSG_BARE_CONTENT_PARAM
,
detachedSignedBareContent
,
sizeof
(
detachedSignedBareContent
));
todo_wine
check_param
(
"detached signed content"
,
msg
,
CMSG_CONTENT_PARAM
,
detachedSignedContent
,
sizeof
(
detachedSignedContent
));
SetLastError
(
0xdeadbeef
);
...
...
@@ -1317,14 +1315,12 @@ static void test_signed_msg_encoding(void)
check_param
(
"signed empty bare content"
,
msg
,
CMSG_BARE_CONTENT_PARAM
,
signedEmptyBareContent
,
sizeof
(
signedEmptyBareContent
));
todo_wine
check_param
(
"signed empty content"
,
msg
,
CMSG_CONTENT_PARAM
,
signedEmptyContent
,
sizeof
(
signedEmptyContent
));
ret
=
CryptMsgUpdate
(
msg
,
msgData
,
sizeof
(
msgData
),
TRUE
);
ok
(
ret
,
"CryptMsgUpdate failed: %x
\n
"
,
GetLastError
());
check_param
(
"signed bare content"
,
msg
,
CMSG_BARE_CONTENT_PARAM
,
signedBareContent
,
sizeof
(
signedBareContent
));
todo_wine
check_param
(
"signed content"
,
msg
,
CMSG_CONTENT_PARAM
,
signedContent
,
sizeof
(
signedContent
));
...
...
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