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
71a5859d
Commit
71a5859d
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 the hash for each signer of a signed encoded message.
parent
4e2b3ab9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
msg.c
dlls/crypt32/msg.c
+17
-3
msg.c
dlls/crypt32/tests/msg.c
+0
-2
No files found.
dlls/crypt32/msg.c
View file @
71a5859d
...
...
@@ -765,9 +765,23 @@ static void CSignedEncodeMsg_Close(HCRYPTMSG hCryptMsg)
static
BOOL
CSignedEncodeMsg_GetParam
(
HCRYPTMSG
hCryptMsg
,
DWORD
dwParamType
,
DWORD
dwIndex
,
void
*
pvData
,
DWORD
*
pcbData
)
{
FIXME
(
"(%p, %d, %d, %p, %p)
\n
"
,
hCryptMsg
,
dwParamType
,
dwIndex
,
pvData
,
pcbData
);
return
FALSE
;
CSignedEncodeMsg
*
msg
=
(
CSignedEncodeMsg
*
)
hCryptMsg
;
BOOL
ret
=
FALSE
;
switch
(
dwParamType
)
{
case
CMSG_COMPUTED_HASH_PARAM
:
if
(
dwIndex
>=
msg
->
cSigners
)
SetLastError
(
CRYPT_E_INVALID_INDEX
);
else
ret
=
CryptGetHashParam
(
msg
->
signers
[
dwIndex
].
hash
,
HP_HASHVAL
,
pvData
,
pcbData
,
0
);
break
;
default:
FIXME
(
"unimplemented for %d
\n
"
,
dwParamType
);
SetLastError
(
CRYPT_E_INVALID_MSG_TYPE
);
}
return
ret
;
}
static
BOOL
CSignedEncodeMsg_UpdateHash
(
CSignedEncodeMsg
*
msg
,
...
...
dlls/crypt32/tests/msg.c
View file @
71a5859d
...
...
@@ -1298,7 +1298,6 @@ static void test_signed_msg_encoding(void)
signedEmptyContent
,
sizeof
(
signedEmptyContent
));
ret
=
CryptMsgUpdate
(
msg
,
msgData
,
sizeof
(
msgData
),
TRUE
);
ok
(
ret
,
"CryptMsgUpdate failed: %x
\n
"
,
GetLastError
());
todo_wine
check_param
(
"detached signed hash"
,
msg
,
CMSG_COMPUTED_HASH_PARAM
,
signedHash
,
sizeof
(
signedHash
));
todo_wine
...
...
@@ -1309,7 +1308,6 @@ static void test_signed_msg_encoding(void)
detachedSignedContent
,
sizeof
(
detachedSignedContent
));
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
1
,
NULL
,
&
size
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_INVALID_INDEX
,
"Expected CRYPT_E_INVALID_INDEX, got %x
\n
"
,
GetLastError
());
...
...
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