Juan Lang : crypt32: Update comments about hash message version numbers.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 13 08:30:33 CDT 2007


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Jul 12 15:06:21 2007 -0700

crypt32: Update comments about hash message version numbers.

---

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

diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index d8ab55a..e97aa0c 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -348,7 +348,7 @@ static BOOL CRYPT_EncodePKCSDigestedData(CHashEncodeMsg *msg, void *pvData,
     if (ret)
     {
         CRYPT_ALGORITHM_IDENTIFIER algoId = { 0 };
-        DWORD version = 0; /* FIXME */
+        DWORD version = CMSG_HASHED_DATA_PKCS_1_5_VERSION;
         struct AsnEncodeSequenceItem items[7] = { { 0 } };
         DWORD cItem = 0;
         CRYPT_DATA_BLOB hash = { 0, NULL };
@@ -455,9 +455,11 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
             SetLastError(CRYPT_E_MSG_ERROR);
         else
         {
-            /* FIXME: under what circumstances is this CMSG_HASHED_DATA_V2? */
             DWORD version = CMSG_HASHED_DATA_PKCS_1_5_VERSION;
 
+            /* Since the data are always encoded as octets, the version is
+             * always 0 (see rfc3852, section 7)
+             */
             ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&version,
              sizeof(version));
         }




More information about the wine-cvs mailing list