Skip to content

Commit f28abdb

Browse files
committed
Fixes decoding of CMS/PKCS #7 messages with an explicit cryptographic object identifier
1 parent 2dc56b5 commit f28abdb

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public sealed class SignerInfo {
4646
// only accessible from SignedPkcs7.SignerInfos
4747
internal SignerInfo (string hashName, X509Certificate2 certificate, SubjectIdentifierType type, object o, int version)
4848
{
49-
_digest = new Oid (CryptoConfig.MapNameToOID (hashName));
49+
_digest = new Oid (CryptoConfig.MapNameToOID (hashName) ?? hashName);
5050
_certificate = certificate;
5151
_counter = new SignerInfoCollection ();
5252
_signed = new CryptographicAttributeObjectCollection ();

0 commit comments

Comments
 (0)