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
804b9d71
Commit
804b9d71
authored
Jul 12, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jul 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement getting hash message version.
parent
e3d6f771
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
msg.c
dlls/crypt32/msg.c
+21
-0
msg.c
dlls/crypt32/tests/msg.c
+0
-3
No files found.
dlls/crypt32/msg.c
View file @
804b9d71
...
@@ -344,6 +344,27 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
...
@@ -344,6 +344,27 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
ret
=
CryptGetHashParam
(
msg
->
hash
,
HP_HASHVAL
,
(
BYTE
*
)
pvData
,
pcbData
,
ret
=
CryptGetHashParam
(
msg
->
hash
,
HP_HASHVAL
,
(
BYTE
*
)
pvData
,
pcbData
,
0
);
0
);
break
;
break
;
case
CMSG_VERSION_PARAM
:
if
(
!
msg
->
base
.
finalized
)
SetLastError
(
CRYPT_E_MSG_ERROR
);
else
if
(
!
pvData
)
{
*
pcbData
=
sizeof
(
DWORD
);
ret
=
TRUE
;
}
else
if
(
*
pcbData
<
sizeof
(
DWORD
))
{
SetLastError
(
ERROR_MORE_DATA
);
*
pcbData
=
sizeof
(
DWORD
);
}
else
{
/* FIXME: under what circumstances is this CMSG_HASHED_DATA_V2? */
*
(
DWORD
*
)
pvData
=
CMSG_HASHED_DATA_PKCS_1_5_VERSION
;
*
pcbData
=
sizeof
(
DWORD
);
ret
=
TRUE
;
}
break
;
default:
default:
FIXME
(
"%d: stub
\n
"
,
dwParamType
);
FIXME
(
"%d: stub
\n
"
,
dwParamType
);
ret
=
FALSE
;
ret
=
FALSE
;
...
...
dlls/crypt32/tests/msg.c
View file @
804b9d71
...
@@ -790,14 +790,11 @@ static void test_hash_msg_get_param(void)
...
@@ -790,14 +790,11 @@ static void test_hash_msg_get_param(void)
/* The version is also available, and should be zero for this message. */
/* The version is also available, and should be zero for this message. */
size
=
0
;
size
=
0
;
ret
=
CryptMsgGetParam
(
msg
,
CMSG_VERSION_PARAM
,
0
,
NULL
,
&
size
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_VERSION_PARAM
,
0
,
NULL
,
&
size
);
todo_wine
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
size
=
sizeof
(
value
);
size
=
sizeof
(
value
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_VERSION_PARAM
,
0
,
(
LPBYTE
)
&
value
,
&
size
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_VERSION_PARAM
,
0
,
(
LPBYTE
)
&
value
,
&
size
);
todo_wine
{
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
ok
(
value
==
0
,
"Expected version 0, got %d
\n
"
,
value
);
ok
(
value
==
0
,
"Expected version 0, got %d
\n
"
,
value
);
}
/* As usual, the type isn't available. */
/* As usual, the type isn't available. */
ret
=
CryptMsgGetParam
(
msg
,
CMSG_TYPE_PARAM
,
0
,
NULL
,
&
size
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_TYPE_PARAM
,
0
,
NULL
,
&
size
);
todo_wine
todo_wine
...
...
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