summary refs log tree commit diff
path: root/crypto/src/asn1/Asn1Sequence.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2024-06-04 20:49:14 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2024-06-04 20:49:14 +0700
commit114cc8223deeadd0047d966d517ac11fbc63893d (patch)
tree775f73ea5b051ed1673a9805f1665cd4bef60bbf /crypto/src/asn1/Asn1Sequence.cs
parentRefactoring in Asn1.BC (diff)
downloadBouncyCastle.NET-ed25519-114cc8223deeadd0047d966d517ac11fbc63893d.tar.xz
Refactor GetInstance methods
Diffstat (limited to 'crypto/src/asn1/Asn1Sequence.cs')
-rw-r--r--crypto/src/asn1/Asn1Sequence.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/asn1/Asn1Sequence.cs b/crypto/src/asn1/Asn1Sequence.cs
index 83e881728..4012e0c08 100644
--- a/crypto/src/asn1/Asn1Sequence.cs
+++ b/crypto/src/asn1/Asn1Sequence.cs
@@ -37,7 +37,7 @@ namespace Org.BouncyCastle.Asn1
             if (obj is Asn1Sequence asn1Sequence)
                 return asn1Sequence;
 
-            if (obj is IAsn1Convertible asn1Convertible)
+            if (obj is IAsn1Convertible asn1Convertible && !(obj is Asn1Object))
             {
                 Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
                 if (asn1Object is Asn1Sequence converted)