diff options
Diffstat (limited to 'crypto/src/asn1/cms/OtherRevocationInfoFormat.cs')
-rw-r--r-- | crypto/src/asn1/cms/OtherRevocationInfoFormat.cs | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/crypto/src/asn1/cms/OtherRevocationInfoFormat.cs b/crypto/src/asn1/cms/OtherRevocationInfoFormat.cs index f6335cdac..d39f14aa8 100644 --- a/crypto/src/asn1/cms/OtherRevocationInfoFormat.cs +++ b/crypto/src/asn1/cms/OtherRevocationInfoFormat.cs @@ -3,6 +3,20 @@ public class OtherRevocationInfoFormat : Asn1Encodable { + public static OtherRevocationInfoFormat GetInstance(object obj) + { + if (obj == null) + return null; + if (obj is OtherRevocationInfoFormat otherRevocationInfoFormat) + return otherRevocationInfoFormat; + return new OtherRevocationInfoFormat(Asn1Sequence.GetInstance(obj)); + } + + public static OtherRevocationInfoFormat GetInstance(Asn1TaggedObject obj, bool isExplicit) + { + return new OtherRevocationInfoFormat(Asn1Sequence.GetInstance(obj, isExplicit)); + } + private readonly DerObjectIdentifier otherRevInfoFormat; private readonly Asn1Encodable otherRevInfo; @@ -20,35 +34,6 @@ otherRevInfo = seq[1]; } - /** - * return a OtherRevocationInfoFormat object from a tagged object. - * - * @param obj the tagged object holding the object we want. - * @param explicit true if the object is meant to be explicitly - * tagged false otherwise. - * @exception IllegalArgumentException if the object held by the - * tagged object cannot be converted. - */ - public static OtherRevocationInfoFormat GetInstance(Asn1TaggedObject obj, bool isExplicit) - { - return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit)); - } - - /** - * return a OtherRevocationInfoFormat object from the given object. - * - * @param obj the object we want converted. - * @exception IllegalArgumentException if the object cannot be converted. - */ - public static OtherRevocationInfoFormat GetInstance(object obj) - { - if (obj is OtherRevocationInfoFormat otherRevocationInfoFormat) - return otherRevocationInfoFormat; - if (obj != null) - return new OtherRevocationInfoFormat(Asn1Sequence.GetInstance(obj)); - return null; - } - public virtual DerObjectIdentifier InfoFormat { get { return otherRevInfoFormat; } |