[release/6.0] Ignore non-X509 certificates in SignedCms (#67462)
authorJeremy Barton <jbarton@microsoft.com>
Wed, 13 Apr 2022 15:23:24 +0000 (08:23 -0700)
committerGitHub <noreply@github.com>
Wed, 13 Apr 2022 15:23:24 +0000 (08:23 -0700)
commit7e2e3c9df1036e5853f55a76049ec79cc4485c6e
tree6566212bf6aa3a56622f24155b92e874e4a39c22
parent1978e2f4d0d14d9c0c5b0f6f8c065c358cc810ec
[release/6.0] Ignore non-X509 certificates in SignedCms  (#67462)

* Ignore non-X509 certificates in SignedCms

This allows for AttributeCertificateV1/AttributeCertificateV2/OtherCertificate
entries in the SignedCms without causing a decode error.  That data is not presented
to callers via the SignedCms object, but the behavior is consistent with SignedCms on
.NET Framework and its underlying WinCryptMsg counterpart.

* Add packaging changes for servicing
src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Asn1/CertificateChoiceAsn.xml
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Asn1/CertificateChoiceAsn.xml.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Asn1/OtherCertificateFormat.xml [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Asn1/OtherCertificateFormat.xml.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedCmsTests.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedDocuments.cs