crypt32(14/17): Add a stub get param function for data messages...
Juan Lang
juan.lang at gmail.com
Thu Jun 28 19:33:07 CDT 2007
and remove stub message from open function.
--Juan
-------------- next part --------------
From 8fe509c3ccf9685e97db21aafd001ac5aa9af75d Mon Sep 17 00:00:00 2001
From: Juan Lang <juanlang at juan.corp.google.com>
Date: Thu, 28 Jun 2007 17:16:15 -0700
Subject: [PATCH] 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 016a108..be0fa08 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -110,6 +110,23 @@ static BOOL CDataEncodeMsg_Update(HCRYPT
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)
{
@@ -120,13 +137,13 @@ static HCRYPTMSG CDataEncodeMsg_Open(DWO
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);
}
--
1.4.1
More information about the wine-patches
mailing list