Commit 427b3fbd authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Allow messages to be opened when compiled with…

crypt32: Allow messages to be opened when compiled with CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS if CMS fields aren't actually used.
parent 9b953c5f
...@@ -632,11 +632,6 @@ static BOOL CRYPT_IsValidSigner(CMSG_SIGNER_ENCODE_INFO_WITH_CMS *signer) ...@@ -632,11 +632,6 @@ static BOOL CRYPT_IsValidSigner(CMSG_SIGNER_ENCODE_INFO_WITH_CMS *signer)
SetLastError(E_INVALIDARG); SetLastError(E_INVALIDARG);
return FALSE; 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) if (!signer->pCertInfo->SerialNumber.cbData)
{ {
SetLastError(E_INVALIDARG); SetLastError(E_INVALIDARG);
...@@ -657,6 +652,19 @@ static BOOL CRYPT_IsValidSigner(CMSG_SIGNER_ENCODE_INFO_WITH_CMS *signer) ...@@ -657,6 +652,19 @@ static BOOL CRYPT_IsValidSigner(CMSG_SIGNER_ENCODE_INFO_WITH_CMS *signer)
SetLastError(CRYPT_E_UNKNOWN_ALGO); SetLastError(CRYPT_E_UNKNOWN_ALGO);
return FALSE; 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; return TRUE;
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <windef.h> #include <windef.h>
#include <winbase.h> #include <winbase.h>
#include <winerror.h> #include <winerror.h>
#define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS
#include <wincrypt.h> #include <wincrypt.h>
#include "wine/test.h" #include "wine/test.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment