summary refs log tree commit diff
path: root/crypto/src/asn1/pkcs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-07-18 12:06:03 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-18 12:06:03 +0700
commit913eada3ad9394f1327a1feb80a3261f7c6e55bb (patch)
tree6366c1e196ad2ac249edf12a4d41d52ee2d28629 /crypto/src/asn1/pkcs
parentRefactoring around PrivateKeyInfo (diff)
downloadBouncyCastle.NET-ed25519-913eada3ad9394f1327a1feb80a3261f7c6e55bb.tar.xz
Deprecated Asn1TaggedObject.GetObject and refactor
Diffstat (limited to 'crypto/src/asn1/pkcs')
-rw-r--r--crypto/src/asn1/pkcs/CertBag.cs2
-rw-r--r--crypto/src/asn1/pkcs/ContentInfo.cs2
-rw-r--r--crypto/src/asn1/pkcs/CrlBag.cs2
-rw-r--r--crypto/src/asn1/pkcs/SafeBag.cs2
4 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/asn1/pkcs/CertBag.cs b/crypto/src/asn1/pkcs/CertBag.cs
index 81868fef6..129a73ada 100644
--- a/crypto/src/asn1/pkcs/CertBag.cs
+++ b/crypto/src/asn1/pkcs/CertBag.cs
@@ -23,7 +23,7 @@ namespace Org.BouncyCastle.Asn1.Pkcs
 				throw new ArgumentException("Wrong number of elements in sequence", nameof(seq));
 
             this.m_certID = DerObjectIdentifier.GetInstance(seq[0]);
-            this.m_certValue = Asn1TaggedObject.GetInstance(seq[1]).GetObject();
+            this.m_certValue = Asn1TaggedObject.GetInstance(seq[1]).GetExplicitBaseObject().ToAsn1Object();
         }
 
 		public CertBag(DerObjectIdentifier certID, Asn1Object certValue)
diff --git a/crypto/src/asn1/pkcs/ContentInfo.cs b/crypto/src/asn1/pkcs/ContentInfo.cs
index 05d9a2033..0a19306f2 100644
--- a/crypto/src/asn1/pkcs/ContentInfo.cs
+++ b/crypto/src/asn1/pkcs/ContentInfo.cs
@@ -22,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Pkcs
 
             if (seq.Count > 1)
             {
-                content = ((Asn1TaggedObject) seq[1]).GetObject();
+                content = ((Asn1TaggedObject) seq[1]).GetExplicitBaseObject();
             }
         }
 
diff --git a/crypto/src/asn1/pkcs/CrlBag.cs b/crypto/src/asn1/pkcs/CrlBag.cs
index 5cc68ace4..0198c341c 100644
--- a/crypto/src/asn1/pkcs/CrlBag.cs
+++ b/crypto/src/asn1/pkcs/CrlBag.cs
@@ -23,7 +23,7 @@ namespace Org.BouncyCastle.Asn1.Pkcs
                 throw new ArgumentException("Wrong number of elements in sequence", nameof(seq));
 
             m_crlID = DerObjectIdentifier.GetInstance(seq[0]);
-            m_crlValue = Asn1TaggedObject.GetInstance(seq[1]).GetObject();
+            m_crlValue = Asn1TaggedObject.GetInstance(seq[1]).GetExplicitBaseObject();
         }
 
         public CrlBag(DerObjectIdentifier crlID, Asn1Encodable crlValue)
diff --git a/crypto/src/asn1/pkcs/SafeBag.cs b/crypto/src/asn1/pkcs/SafeBag.cs
index 0c4f3972b..8b35a6717 100644
--- a/crypto/src/asn1/pkcs/SafeBag.cs
+++ b/crypto/src/asn1/pkcs/SafeBag.cs
@@ -42,7 +42,7 @@ namespace Org.BouncyCastle.Asn1.Pkcs
 		private SafeBag(Asn1Sequence seq)
         {
             this.bagID = (DerObjectIdentifier)seq[0];
-            this.bagValue = ((Asn1TaggedObject)seq[1]).GetObject();
+            this.bagValue = ((Asn1TaggedObject)seq[1]).GetExplicitBaseObject().ToAsn1Object();
             if (seq.Count == 3)
             {
                 this.bagAttributes = (Asn1Set)seq[2];