Added patch to skip unknown item when decoding a CMS certificate.

This commit is contained in:
Sebastian Lackner
2015-05-16 17:55:21 +02:00
parent 7a5534ac75
commit bfb112653c
4 changed files with 126 additions and 79 deletions

View File

@@ -0,0 +1,26 @@
From 4f25f61cd878088ae1c55f3dbe2ae2ab715e0e69 Mon Sep 17 00:00:00 2001
From: Charles Davis <cdavis5x@gmail.com>
Date: Sun, 1 Sep 2013 23:39:41 -0600
Subject: crypt32: Skip unknown item when decoding a CMS certificate.
---
dlls/crypt32/decode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 90d8cdf..faf49cc 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -5643,6 +5643,9 @@ static BOOL CRYPT_AsnDecodeCMSSignerInfoInternal(const BYTE *pbEncoded,
offsetof(CMSG_CMS_SIGNER_INFO, AuthAttrs),
CRYPT_AsnDecodePKCSAttributesInternal, sizeof(CRYPT_ATTRIBUTES),
TRUE, TRUE, offsetof(CMSG_CMS_SIGNER_INFO, AuthAttrs.rgAttr), 0 },
+ /* FIXME: Tests show that CertOpenStore accepts such certificates, but
+ * how exactly should they be interpreted? */
+ { ASN_CONSTRUCTOR | ASN_UNIVERSAL | 0x11, 0, NULL, 0, TRUE, FALSE, 0, 0 },
{ ASN_SEQUENCEOF, offsetof(CMSG_CMS_SIGNER_INFO, HashEncryptionAlgorithm),
CRYPT_AsnDecodeAlgorithmId, sizeof(CRYPT_ALGORITHM_IDENTIFIER),
FALSE, TRUE, offsetof(CMSG_CMS_SIGNER_INFO,
--
2.4.0