OtherRevocationInfoFormat
using System;
namespace Org.BouncyCastle.Asn1.Cms
{
public class OtherRevocationInfoFormat : Asn1Encodable
{
private readonly DerObjectIdentifier m_otherRevInfoFormat;
private readonly Asn1Encodable m_otherRevInfo;
public virtual DerObjectIdentifier InfoFormat => m_otherRevInfoFormat;
public virtual Asn1Encodable Info => m_otherRevInfo;
public static OtherRevocationInfoFormat GetInstance(object obj)
{
if (obj == null)
return null;
OtherRevocationInfoFormat otherRevocationInfoFormat = obj as OtherRevocationInfoFormat;
if (otherRevocationInfoFormat != null)
return otherRevocationInfoFormat;
return new OtherRevocationInfoFormat(Asn1Sequence.GetInstance(obj));
}
public static OtherRevocationInfoFormat GetInstance(Asn1TaggedObject obj, bool isExplicit)
{
return new OtherRevocationInfoFormat(Asn1Sequence.GetInstance(obj, isExplicit));
}
public static OtherRevocationInfoFormat GetTagged(Asn1TaggedObject taggedObject, bool declaredExplicit)
{
return new OtherRevocationInfoFormat(Asn1Sequence.GetTagged(taggedObject, declaredExplicit));
}
public OtherRevocationInfoFormat(DerObjectIdentifier otherRevInfoFormat, Asn1Encodable otherRevInfo)
{
if (otherRevInfoFormat == null)
throw new ArgumentNullException("otherRevInfoFormat");
m_otherRevInfoFormat = otherRevInfoFormat;
if (otherRevInfo == null)
throw new ArgumentNullException("otherRevInfo");
m_otherRevInfo = otherRevInfo;
}
private OtherRevocationInfoFormat(Asn1Sequence seq)
{
int count = seq.Count;
if (count != 2)
throw new ArgumentException("Bad sequence size: " + count.ToString(), "seq");
m_otherRevInfoFormat = DerObjectIdentifier.GetInstance(seq[0]);
m_otherRevInfo = seq[1];
}
public override Asn1Object ToAsn1Object()
{
return new DerSequence(m_otherRevInfoFormat, m_otherRevInfo);
}
}
}