Juan Lang : crypt32: Implement getting version from an encoded signed message.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 24 07:06:13 CDT 2007


Module: wine
Branch: master
Commit: 4f30f90c39bc03b72e98ae00d5ff2767b5b6ee20
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4f30f90c39bc03b72e98ae00d5ff2767b5b6ee20

Author: Juan Lang <juan.lang at gmail.com>
Date:   Mon Jul 23 18:22:30 2007 -0700

crypt32: Implement getting version from an encoded signed message.

---

 dlls/crypt32/msg.c       |    4 ++++
 dlls/crypt32/tests/msg.c |    3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index 7ba78a9..8a1fea0 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -865,6 +865,10 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
             ret = CryptGetHashParam(msg->signerHandles[dwIndex].hash,
              HP_HASHVAL, pvData, pcbData, 0);
         break;
+    case CMSG_VERSION_PARAM:
+        ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->info.version,
+         sizeof(msg->info.version));
+        break;
     default:
         FIXME("unimplemented for %d\n", dwParamType);
         SetLastError(CRYPT_E_INVALID_MSG_TYPE);
diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c
index 6ee0de6..0568331 100644
--- a/dlls/crypt32/tests/msg.c
+++ b/dlls/crypt32/tests/msg.c
@@ -1355,14 +1355,11 @@ static void test_signed_msg_get_param(void)
     /* For "signed" messages, so is the version. */
     size = 0;
     ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, NULL, &size);
-    todo_wine
     ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError());
     size = sizeof(value);
     ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, (LPBYTE)&value, &size);
-    todo_wine {
     ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError());
     ok(value == CMSG_SIGNED_DATA_V1, "Expected version 1, got %d\n", value);
-    }
     /* But for this message, with no signers, the hash and signer aren't
      * available.
      */




More information about the wine-cvs mailing list