diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-05 16:27:08 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-05 16:27:08 +0700 |
commit | 60bb54cb19ef207c55fa52b2f48aa5830bc3649d (patch) | |
tree | 55225219071d2fa710f876a9aa6f1093adfc7069 /crypto/src/asn1/DerBoolean.cs | |
parent | Refactoring in Asn1.Crmf (diff) | |
download | BouncyCastle.NET-ed25519-60bb54cb19ef207c55fa52b2f48aa5830bc3649d.tar.xz |
Refactoring in Asn1
Diffstat (limited to 'crypto/src/asn1/DerBoolean.cs')
-rw-r--r-- | crypto/src/asn1/DerBoolean.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/src/asn1/DerBoolean.cs b/crypto/src/asn1/DerBoolean.cs index a92346044..0f9388363 100644 --- a/crypto/src/asn1/DerBoolean.cs +++ b/crypto/src/asn1/DerBoolean.cs @@ -36,10 +36,9 @@ namespace Org.BouncyCastle.Asn1 if (obj is DerBoolean derBoolean) return derBoolean; - if (obj is IAsn1Convertible asn1Convertible && !(obj is Asn1Object)) + if (obj is IAsn1Convertible asn1Convertible) { - Asn1Object asn1Object = asn1Convertible.ToAsn1Object(); - if (asn1Object is DerBoolean converted) + if (!(obj is Asn1Object) && asn1Convertible.ToAsn1Object() is DerBoolean converted) return converted; } else if (obj is byte[] bytes) |