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