diff options
Diffstat (limited to 'crypto/src/asn1/cms/SCVPReqRes.cs')
-rw-r--r-- | crypto/src/asn1/cms/SCVPReqRes.cs | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/crypto/src/asn1/cms/SCVPReqRes.cs b/crypto/src/asn1/cms/SCVPReqRes.cs index 8b5f858a6..ec36ff9fa 100644 --- a/crypto/src/asn1/cms/SCVPReqRes.cs +++ b/crypto/src/asn1/cms/SCVPReqRes.cs @@ -1,22 +1,25 @@ -using System; - -namespace Org.BouncyCastle.Asn1.Cms +namespace Org.BouncyCastle.Asn1.Cms { public class ScvpReqRes : Asn1Encodable { - private readonly ContentInfo request; - private readonly ContentInfo response; + public static ScvpReqRes GetInstance(object obj) + { + if (obj == null) + return null; + if (obj is ScvpReqRes scvpReqRes) + return scvpReqRes; + return new ScvpReqRes(Asn1Sequence.GetInstance(obj)); + } - public static ScvpReqRes GetInstance(object obj) + public static ScvpReqRes GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) { - if (obj is ScvpReqRes) - return (ScvpReqRes)obj; - if (obj != null) - return new ScvpReqRes(Asn1Sequence.GetInstance(obj)); - return null; + return new ScvpReqRes(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); } + private readonly ContentInfo request; + private readonly ContentInfo response; + private ScvpReqRes(Asn1Sequence seq) { if (seq[0] is Asn1TaggedObject taggedObject) |