diff options
Diffstat (limited to 'crypto/src/asn1/cms/TimeStampAndCRL.cs')
-rw-r--r-- | crypto/src/asn1/cms/TimeStampAndCRL.cs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/crypto/src/asn1/cms/TimeStampAndCRL.cs b/crypto/src/asn1/cms/TimeStampAndCRL.cs index 4cb5f2a52..c0cd48905 100644 --- a/crypto/src/asn1/cms/TimeStampAndCRL.cs +++ b/crypto/src/asn1/cms/TimeStampAndCRL.cs @@ -1,11 +1,23 @@ -using System; - namespace Org.BouncyCastle.Asn1.Cms { - public class TimeStampAndCrl + public class TimeStampAndCrl : Asn1Encodable { - private ContentInfo timeStamp; + public static TimeStampAndCrl GetInstance(object obj) + { + if (obj == null) + return null; + if (obj is TimeStampAndCrl timeStampAndCrl) + return timeStampAndCrl; + return new TimeStampAndCrl(Asn1Sequence.GetInstance(obj)); + } + + public static TimeStampAndCrl GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) + { + return new TimeStampAndCrl(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); + } + + private ContentInfo timeStamp; private X509.CertificateList crl; public TimeStampAndCrl(ContentInfo timeStamp) @@ -22,17 +34,6 @@ namespace Org.BouncyCastle.Asn1.Cms } } - public static TimeStampAndCrl GetInstance(object obj) - { - if (obj is TimeStampAndCrl) - return (TimeStampAndCrl)obj; - - if (obj != null) - return new TimeStampAndCrl(Asn1Sequence.GetInstance(obj)); - - return null; - } - public virtual ContentInfo TimeStampToken { get { return this.timeStamp; } |