diff options
Diffstat (limited to 'crypto/src/cms/CMSEnvelopedDataParser.cs')
-rw-r--r-- | crypto/src/cms/CMSEnvelopedDataParser.cs | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/crypto/src/cms/CMSEnvelopedDataParser.cs b/crypto/src/cms/CMSEnvelopedDataParser.cs index d273ea648..e198ed822 100644 --- a/crypto/src/cms/CMSEnvelopedDataParser.cs +++ b/crypto/src/cms/CMSEnvelopedDataParser.cs @@ -106,15 +106,7 @@ namespace Org.BouncyCastle.Cms * return the ASN.1 encoded encryption algorithm parameters, or null if * there aren't any. */ - public Asn1Object EncryptionAlgParams - { - get - { - Asn1Encodable ae = _encAlg.Parameters; - - return ae == null ? null : ae.ToAsn1Object(); - } - } + public Asn1Object EncryptionAlgParams => _encAlg.Parameters?.ToAsn1Object(); /** * return a store of the intended recipients for this message @@ -139,17 +131,7 @@ namespace Org.BouncyCastle.Cms if (asn1Set != null) { - Asn1EncodableVector v = new Asn1EncodableVector(); - IAsn1Convertible o; - - while ((o = asn1Set.ReadObject()) != null) - { - Asn1SequenceParser seq = (Asn1SequenceParser)o; - - v.Add(seq.ToAsn1Object()); - } - - _unprotectedAttributes = new Asn1.Cms.AttributeTable(new DerSet(v)); + _unprotectedAttributes = CmsUtilities.ParseAttributeTable(asn1Set); } } |