Module: wine Branch: master Commit: 3297080045de9d2917b089483c7b0039dd78c8c8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3297080045de9d2917b089483c...
Author: Juan Lang juan.lang@gmail.com Date: Thu Aug 14 17:21:41 2008 -0700
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 deletions(-)
diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 6e78409..ad4ba95 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 b8c40f9..0f69190 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -24,6 +24,7 @@ #include <winbase.h> #include <winerror.h> #define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS +#define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS #include <wincrypt.h>
#include "wine/test.h"