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
5db6b1cc
Commit
5db6b1cc
authored
Jun 28, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jun 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add an update function, use it to implement CryptMsgUpdate.
parent
d5e784bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
msg.c
dlls/crypt32/msg.c
+11
-2
msg.c
dlls/crypt32/tests/msg.c
+2
-0
No files found.
dlls/crypt32/msg.c
View file @
5db6b1cc
...
...
@@ -32,11 +32,15 @@ typedef void (*CryptMsgCloseFunc)(HCRYPTMSG msg);
typedef
BOOL
(
*
CryptMsgGetParamFunc
)(
HCRYPTMSG
hCryptMsg
,
DWORD
dwParamType
,
DWORD
dwIndex
,
void
*
pvData
,
DWORD
*
pcbData
);
typedef
BOOL
(
*
CryptMsgUpdateFunc
)(
HCRYPTMSG
hCryptMsg
,
const
BYTE
*
pbData
,
DWORD
cbData
,
BOOL
fFinal
);
typedef
struct
_CryptMsgBase
{
LONG
ref
;
DWORD
open_flags
;
CryptMsgCloseFunc
close
;
CryptMsgUpdateFunc
update
;
CryptMsgGetParamFunc
get_param
;
}
CryptMsgBase
;
...
...
@@ -171,8 +175,13 @@ BOOL WINAPI CryptMsgClose(HCRYPTMSG hCryptMsg)
BOOL
WINAPI
CryptMsgUpdate
(
HCRYPTMSG
hCryptMsg
,
const
BYTE
*
pbData
,
DWORD
cbData
,
BOOL
fFinal
)
{
FIXME
(
"(%p, %p, %d, %d): stub
\n
"
,
hCryptMsg
,
pbData
,
cbData
,
fFinal
);
return
TRUE
;
CryptMsgBase
*
msg
=
(
CryptMsgBase
*
)
hCryptMsg
;
BOOL
ret
=
FALSE
;
TRACE
(
"(%p, %p, %d, %d)
\n
"
,
hCryptMsg
,
pbData
,
cbData
,
fFinal
);
if
(
msg
&&
msg
->
update
)
ret
=
msg
->
update
(
hCryptMsg
,
pbData
,
cbData
,
fFinal
);
return
ret
;
}
BOOL
WINAPI
CryptMsgGetParam
(
HCRYPTMSG
hCryptMsg
,
DWORD
dwParamType
,
...
...
dlls/crypt32/tests/msg.c
View file @
5db6b1cc
...
...
@@ -314,6 +314,7 @@ static void test_data_msg_update(void)
"Expected CRYPT_E_MSG_ERROR, got %x
\n
"
,
GetLastError
());
/* Updating it with final = TRUE succeeds */
ret
=
CryptMsgUpdate
(
msg
,
msgData
,
sizeof
(
msgData
),
TRUE
);
todo_wine
ok
(
ret
,
"CryptMsgUpdate failed: %x
\n
"
,
GetLastError
());
/* Any subsequent update will fail, as the last was final */
SetLastError
(
0xdeadbeef
);
...
...
@@ -354,6 +355,7 @@ static void test_data_msg_update(void)
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %x
\n
"
,
GetLastError
());
ret
=
CryptMsgUpdate
(
msg
,
msgData
,
sizeof
(
msgData
),
TRUE
);
todo_wine
ok
(
ret
,
"CryptMsgUpdate failed: %x
\n
"
,
GetLastError
());
CryptMsgClose
(
msg
);
}
...
...
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