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/Asn1Null.cs | |
parent | Refactoring in Asn1.Crmf (diff) | |
download | BouncyCastle.NET-ed25519-60bb54cb19ef207c55fa52b2f48aa5830bc3649d.tar.xz |
Refactoring in Asn1
Diffstat (limited to 'crypto/src/asn1/Asn1Null.cs')
-rw-r--r-- | crypto/src/asn1/Asn1Null.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/src/asn1/Asn1Null.cs b/crypto/src/asn1/Asn1Null.cs index 99f5a530c..992cd09aa 100644 --- a/crypto/src/asn1/Asn1Null.cs +++ b/crypto/src/asn1/Asn1Null.cs @@ -31,10 +31,9 @@ namespace Org.BouncyCastle.Asn1 if (obj is Asn1Null asn1Null) return asn1Null; - if (obj is IAsn1Convertible asn1Convertible && !(obj is Asn1Object)) + if (obj is IAsn1Convertible asn1Convertible) { - Asn1Object asn1Object = asn1Convertible.ToAsn1Object(); - if (asn1Object is Asn1Null converted) + if (!(obj is Asn1Object) && asn1Convertible.ToAsn1Object() is Asn1Null converted) return converted; } else if (obj is byte[] bytes) |