Module: wine Branch: master Commit: 427b3fbd5d8127ede4b2e7bce19de724d68c0624 URL: http://source.winehq.org/git/wine.git/?a=commit;h=427b3fbd5d8127ede4b2e7bce1...
Author: Juan Lang juan.lang@gmail.com Date: Thu Aug 14 17:19:19 2008 -0700
crypt32: Allow messages to be opened when compiled with CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS if CMS fields aren't actually used.
---
dlls/crypt32/msg.c | 18 +++++++++++++----- dlls/crypt32/tests/msg.c | 1 + 2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 63121fd..6e78409 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -632,11 +632,6 @@ static BOOL CRYPT_IsValidSigner(CMSG_SIGNER_ENCODE_INFO_WITH_CMS *signer) SetLastError(E_INVALIDARG); return FALSE; } - if (signer->cbSize == sizeof(CMSG_SIGNER_ENCODE_INFO_WITH_CMS)) - { - FIXME("CMSG_SIGNER_ENCODE_INFO with CMS fields unsupported\n"); - return FALSE; - } if (!signer->pCertInfo->SerialNumber.cbData) { SetLastError(E_INVALIDARG); @@ -657,6 +652,19 @@ static BOOL CRYPT_IsValidSigner(CMSG_SIGNER_ENCODE_INFO_WITH_CMS *signer) SetLastError(CRYPT_E_UNKNOWN_ALGO); return FALSE; } + if (signer->cbSize == sizeof(CMSG_SIGNER_ENCODE_INFO_WITH_CMS)) + { + if (signer->SignerId.dwIdChoice) + { + FIXME("CMSG_SIGNER_ENCODE_INFO with CMS fields unsupported\n"); + return FALSE; + } + if (signer->HashEncryptionAlgorithm.pszObjId) + { + FIXME("CMSG_SIGNER_ENCODE_INFO with CMS fields unsupported\n"); + return FALSE; + } + } return TRUE; }
diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index 0f7dcb6..b8c40f9 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -23,6 +23,7 @@ #include <windef.h> #include <winbase.h> #include <winerror.h> +#define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS #include <wincrypt.h>
#include "wine/test.h"