summary refs log tree commit diff
path: root/crypto/src/asn1/DLTaggedObject.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-11-12 01:54:30 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-11-12 01:54:30 +0700
commit8c32dba3fc4f2033e7597ee1999e793cf6552584 (patch)
treec48d45537cfbea6f7e0ab92de4793a2b35204573 /crypto/src/asn1/DLTaggedObject.cs
parentAdd new Equals method (diff)
downloadBouncyCastle.NET-ed25519-8c32dba3fc4f2033e7597ee1999e793cf6552584.tar.xz
Reimplement application-specific over tagged object
Diffstat (limited to 'crypto/src/asn1/DLTaggedObject.cs')
-rw-r--r--crypto/src/asn1/DLTaggedObject.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/crypto/src/asn1/DLTaggedObject.cs b/crypto/src/asn1/DLTaggedObject.cs
index 1c5e990b4..314b42799 100644
--- a/crypto/src/asn1/DLTaggedObject.cs
+++ b/crypto/src/asn1/DLTaggedObject.cs
@@ -12,13 +12,23 @@ namespace Org.BouncyCastle.Asn1
         {
         }
 
-        internal DLTaggedObject(bool explicitly, int tagNo, Asn1Encodable obj)
-            : base(explicitly, tagNo, obj)
+        internal DLTaggedObject(int tagClass, int tagNo, Asn1Encodable obj)
+            : base(tagClass, tagNo, obj)
         {
         }
 
-        internal DLTaggedObject(int tagNo)
-            : base(false, tagNo, DLSequence.Empty)
+        internal DLTaggedObject(bool isExplicit, int tagNo, Asn1Encodable obj)
+            : base(isExplicit, tagNo, obj)
+        {
+        }
+
+        internal DLTaggedObject(bool isExplicit, int tagClass, int tagNo, Asn1Encodable obj)
+            : base(isExplicit, tagClass, tagNo, obj)
+        {
+        }
+
+        internal DLTaggedObject(int explicitness, int tagClass, int tagNo, Asn1Encodable obj)
+            : base(explicitness, tagClass, tagNo, obj)
         {
         }
 
@@ -97,6 +107,11 @@ namespace Org.BouncyCastle.Asn1
             return new DLSequence(asn1Object);
         }
 
+        internal override Asn1TaggedObject ReplaceTag(int tagClass, int tagNo)
+        {
+            return new DLTaggedObject(explicitness, tagClass, tagNo, obj);
+        }
+
         private int GetContentsLengthDL(Asn1Object baseObject, bool withBaseID)
         {
             if (m_contentsLengthDL < 0)