GetInstance() public static method

public static GetInstance ( Asn1TaggedObject obj, bool isExplicit ) : ResponderID
obj Org.BouncyCastle.Asn1.Asn1TaggedObject
isExplicit bool
return ResponderID
Exemplo n.º 1
0
        private ResponseData(Asn1Sequence seq)
        {
            int           num           = 0;
            Asn1Encodable asn1Encodable = seq[0];

            if (asn1Encodable is Asn1TaggedObject)
            {
                Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)asn1Encodable;
                if (asn1TaggedObject.TagNo == 0)
                {
                    this.versionPresent = true;
                    this.version        = DerInteger.GetInstance(asn1TaggedObject, true);
                    num++;
                }
                else
                {
                    this.version = ResponseData.V1;
                }
            }
            else
            {
                this.version = ResponseData.V1;
            }
            this.responderID = ResponderID.GetInstance(seq[num++]);
            this.producedAt  = (DerGeneralizedTime)seq[num++];
            this.responses   = (Asn1Sequence)seq[num++];
            if (seq.Count > num)
            {
                this.responseExtensions = X509Extensions.GetInstance((Asn1TaggedObject)seq[num], true);
            }
        }
Exemplo n.º 2
0
        private ResponseData(
            Asn1Sequence seq)
        {
            int index = 0;

            Asn1Encodable enc = seq[0];

            if (enc is Asn1TaggedObject)
            {
                Asn1TaggedObject o = (Asn1TaggedObject)enc;

                if (o.TagNo == 0)
                {
                    this.versionPresent = true;
                    this.version        = DerInteger.GetInstance(o, true);
                    index++;
                }
                else
                {
                    this.version = V1;
                }
            }
            else
            {
                this.version = V1;
            }

            this.responderID = ResponderID.GetInstance(seq[index++]);
            this.producedAt  = (DerGeneralizedTime)seq[index++];
            this.responses   = (Asn1Sequence)seq[index++];

            if (seq.Count > index)
            {
                this.responseExtensions = X509Extensions.GetInstance(
                    (Asn1TaggedObject)seq[index], true);
            }
        }
Exemplo n.º 3
0
 public static ResponderID GetInstance(Asn1TaggedObject obj, bool isExplicit)
 {
     return(ResponderID.GetInstance(obj.GetObject()));
 }