diff options
Diffstat (limited to 'crypto/src/asn1/cmp/CertStatus.cs')
-rw-r--r-- | crypto/src/asn1/cmp/CertStatus.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crypto/src/asn1/cmp/CertStatus.cs b/crypto/src/asn1/cmp/CertStatus.cs index 6eb36c6fb..37f0c29e8 100644 --- a/crypto/src/asn1/cmp/CertStatus.cs +++ b/crypto/src/asn1/cmp/CertStatus.cs @@ -10,13 +10,16 @@ namespace Org.BouncyCastle.Asn1.Cmp { public static CertStatus GetInstance(object obj) { - if (obj is CertStatus certStatus) - return certStatus; - - if (obj != null) - return new CertStatus(Asn1Sequence.GetInstance(obj)); + if (obj == null) + return null; + if (obj is CertStatus certStatus) + return certStatus; + return new CertStatus(Asn1Sequence.GetInstance(obj)); + } - return null; + public static CertStatus GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) + { + return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); } private readonly Asn1OctetString m_certHash; |