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"