From 114cc8223deeadd0047d966d517ac11fbc63893d Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 4 Jun 2024 20:49:14 +0700 Subject: Refactor GetInstance methods --- crypto/src/asn1/Asn1Sequence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/src/asn1/Asn1Sequence.cs') 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) -- cgit 1.4.1