From 3297080045de9d2917b089483c7b0039dd78c8c8 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 14 Aug 2008 17:21:41 -0700 Subject: [PATCH] crypt32: Allow messages to be opened when compiled with CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS if CMS fields aren't actually used. --- dlls/crypt32/msg.c | 3 ++- dlls/crypt32/tests/msg.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 6e7840981a3..ad4ba959d22 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -1259,7 +1259,8 @@ static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags, SetLastError(E_INVALIDARG); return NULL; } - if (info->cbSize == sizeof(CMSG_SIGNED_ENCODE_INFO_WITH_CMS)) + if (info->cbSize == sizeof(CMSG_SIGNED_ENCODE_INFO_WITH_CMS) && + info->rgAttrCertEncoded) { FIXME("CMSG_SIGNED_ENCODE_INFO with CMS fields unsupported\n"); return NULL; diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index b8c40f968f0..0f691902079 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -24,6 +24,7 @@ #include #include #define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS +#define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS #include #include "wine/test.h" -- 2.11.4.GIT