diff options
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r-- | crypto/src/asn1/DerObjectIdentifier.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerObjectIdentifier.cs b/crypto/src/asn1/DerObjectIdentifier.cs index 6ac2b7e9e..495260a68 100644 --- a/crypto/src/asn1/DerObjectIdentifier.cs +++ b/crypto/src/asn1/DerObjectIdentifier.cs @@ -42,7 +42,14 @@ namespace Org.BouncyCastle.Asn1 Asn1TaggedObject obj, bool explicitly) { - return GetInstance(obj.GetObject()); + Asn1Object o = obj.GetObject(); + + if (explicitly || o is DerObjectIdentifier) + { + return GetInstance(o); + } + + return FromOctetString(Asn1OctetString.GetInstance(o).GetOctets()); } public DerObjectIdentifier( |