diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-24 20:04:26 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-24 20:04:26 +0700 |
commit | 438dc8d53aac9b7483a2014cd4398b8275c496ab (patch) | |
tree | d4e53f01313d43c20cf32ae5c930e0d54a364114 /crypto/src/asn1/cms/AuthenticatedData.cs | |
parent | Add TODO (diff) | |
download | BouncyCastle.NET-ed25519-438dc8d53aac9b7483a2014cd4398b8275c496ab.tar.xz |
ASN.1: Use GetTagged with cursor methods
- Add GetTagged method for all CHOICE types - Make most Asn1Utilities methods public
Diffstat (limited to 'crypto/src/asn1/cms/AuthenticatedData.cs')
-rw-r--r-- | crypto/src/asn1/cms/AuthenticatedData.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/asn1/cms/AuthenticatedData.cs b/crypto/src/asn1/cms/AuthenticatedData.cs index fad7de35f..285a16840 100644 --- a/crypto/src/asn1/cms/AuthenticatedData.cs +++ b/crypto/src/asn1/cms/AuthenticatedData.cs @@ -56,14 +56,14 @@ namespace Org.BouncyCastle.Asn1.Cms throw new ArgumentException("Bad sequence size: " + count, nameof(seq)); m_version = DerInteger.GetInstance(seq[pos++]); - m_originatorInfo = Asn1Utilities.ReadOptionalContextTagged(seq, ref pos, 0, false, OriginatorInfo.GetInstance); + m_originatorInfo = Asn1Utilities.ReadOptionalContextTagged(seq, ref pos, 0, false, OriginatorInfo.GetTagged); m_recipientInfos = Asn1Set.GetInstance(seq[pos++]); m_macAlgorithm = AlgorithmIdentifier.GetInstance(seq[pos++]); - m_digestAlgorithm = Asn1Utilities.ReadOptionalContextTagged(seq, ref pos, 1, false, AlgorithmIdentifier.GetInstance); + m_digestAlgorithm = Asn1Utilities.ReadOptionalContextTagged(seq, ref pos, 1, false, AlgorithmIdentifier.GetTagged); m_encapsulatedContentInfo = ContentInfo.GetInstance(seq[pos++]); - m_authAttrs = Asn1Utilities.ReadOptionalContextTagged(seq, ref pos, 2, false, Asn1Set.GetInstance); + m_authAttrs = Asn1Utilities.ReadOptionalContextTagged(seq, ref pos, 2, false, Asn1Set.GetTagged); m_mac = Asn1OctetString.GetInstance(seq[pos++]); - m_unauthAttrs = Asn1Utilities.ReadOptionalContextTagged(seq, ref pos, 3, false, Asn1Set.GetInstance); + m_unauthAttrs = Asn1Utilities.ReadOptionalContextTagged(seq, ref pos, 3, false, Asn1Set.GetTagged); if (pos != count) throw new ArgumentException("Unexpected elements in sequence", nameof(seq)); |