Juan Lang : crypt32:
Add a stub get param function for data messages and remove stub message
from open function .
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jun 29 08:14:40 CDT 2007
Module: wine
Branch: master
Commit: 0546cf1a696125b82843959a5d0d7de36a5abb40
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0546cf1a696125b82843959a5d0d7de36a5abb40
Author: Juan Lang <juan.lang at gmail.com>
Date: Thu Jun 28 17:16:15 2007 -0700
crypt32: Add a stub get param function for data messages and remove stub message from open function.
---
dlls/crypt32/msg.c | 19 ++++++++++++++++++-
dlls/crypt32/tests/msg.c | 2 +-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index b88694a..e392b79 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -109,6 +109,23 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
return ret;
}
+static BOOL CDataEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
+ DWORD dwIndex, void *pvData, DWORD *pcbData)
+{
+ BOOL ret = FALSE;
+
+ switch (dwParamType)
+ {
+ case CMSG_CONTENT_PARAM:
+ case CMSG_BARE_CONTENT_PARAM:
+ FIXME("stub\n");
+ break;
+ default:
+ SetLastError(CRYPT_E_INVALID_MSG_TYPE);
+ }
+ return ret;
+}
+
static HCRYPTMSG CDataEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
LPSTR pszInnerContentObjID, PCMSG_STREAM_INFO pStreamInfo)
{
@@ -119,13 +136,13 @@ static HCRYPTMSG CDataEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
SetLastError(E_INVALIDARG);
return NULL;
}
- FIXME("semi-stub\n");
msg = CryptMemAlloc(sizeof(CDataEncodeMsg));
if (msg)
{
CryptMsgBase_Init((CryptMsgBase *)msg, dwFlags, pStreamInfo);
msg->base.close = CDataEncodeMsg_Close;
msg->base.update = CDataEncodeMsg_Update;
+ msg->base.get_param = CDataEncodeMsg_GetParam;
msg->bare_content_len = sizeof(empty_data_content);
msg->bare_content = (LPBYTE)empty_data_content;
}
diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c
index 03d0abf..0d4ea3a 100644
--- a/dlls/crypt32/tests/msg.c
+++ b/dlls/crypt32/tests/msg.c
@@ -369,6 +369,7 @@ static void test_data_msg_get_param(void)
size = 0;
ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size);
ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError());
+ }
/* But for this type of message, the signer and hash aren't applicable,
* and the type isn't available.
*/
@@ -384,7 +385,6 @@ static void test_data_msg_get_param(void)
ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size);
ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE,
"Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError());
- }
CryptMsgClose(msg);
}
More information about the wine-cvs
mailing list