diff options
Diffstat (limited to 'crypto/src/asn1/cmp/CertReqTemplateContent.cs')
-rw-r--r-- | crypto/src/asn1/cmp/CertReqTemplateContent.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crypto/src/asn1/cmp/CertReqTemplateContent.cs b/crypto/src/asn1/cmp/CertReqTemplateContent.cs index c25c71ad1..c08a9a293 100644 --- a/crypto/src/asn1/cmp/CertReqTemplateContent.cs +++ b/crypto/src/asn1/cmp/CertReqTemplateContent.cs @@ -22,13 +22,16 @@ namespace Org.BouncyCastle.Asn1.Cmp { public static CertReqTemplateContent GetInstance(object obj) { + if (obj == null) + return null; if (obj is CertReqTemplateContent certReqTemplateContent) return certReqTemplateContent; + return new CertReqTemplateContent(Asn1Sequence.GetInstance(obj)); + } - if (obj != null) - return new CertReqTemplateContent(Asn1Sequence.GetInstance(obj)); - - return null; + public static CertReqTemplateContent GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) + { + return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); } private readonly CertTemplate m_certTemplate; |