summary refs log tree commit diff
path: root/crypto/src/asn1/Asn1InputStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/Asn1InputStream.cs')
-rw-r--r--crypto/src/asn1/Asn1InputStream.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crypto/src/asn1/Asn1InputStream.cs b/crypto/src/asn1/Asn1InputStream.cs
index 96b0a1c66..a1bc987cc 100644
--- a/crypto/src/asn1/Asn1InputStream.cs
+++ b/crypto/src/asn1/Asn1InputStream.cs
@@ -377,7 +377,9 @@ namespace Org.BouncyCastle.Asn1
             switch (tagNo)
             {
             case Asn1Tags.BmpString:
+            {
                 return CreateDerBmpString(defIn);
+            }
             case Asn1Tags.Boolean:
             {
                 GetBuffer(defIn, tmpBuffers, out var contents);
@@ -393,6 +395,11 @@ namespace Org.BouncyCastle.Asn1
                 bool usedBuffer = GetBuffer(defIn, tmpBuffers, out var contents);
                 return DerObjectIdentifier.CreatePrimitive(contents, clone: usedBuffer);
             }
+            case Asn1Tags.RelativeOid:
+            {
+                bool usedBuffer = GetBuffer(defIn, tmpBuffers, out var contents);
+                return Asn1RelativeOid.CreatePrimitive(contents, clone: usedBuffer);
+            }
             }
 
             byte[] bytes = defIn.ToArray();
@@ -421,8 +428,6 @@ namespace Org.BouncyCastle.Asn1
                 return Asn1OctetString.CreatePrimitive(bytes);
             case Asn1Tags.PrintableString:
                 return DerPrintableString.CreatePrimitive(bytes);
-            case Asn1Tags.RelativeOid:
-                return Asn1RelativeOid.CreatePrimitive(bytes, false);
             case Asn1Tags.T61String:
                 return DerT61String.CreatePrimitive(bytes);
             case Asn1Tags.UniversalString: