Inheritance: Asn1Encodable, IAsn1Choice
Exemple #1
0
 public PkiMessage(
     PkiHeader header,
     PkiBody body,
     DerBitString protection)
     : this(header, body, protection, null)
 {
 }
 public PkiMessage(
     PkiHeader header,
     PkiBody body,
     DerBitString protection)
     : this(header, body, protection, null)
 {
 }
 public PkiMessage(PkiHeader header, PkiBody body, DerBitString protection, CmpCertificate[] extraCerts)
 {
     this.header     = header;
     this.body       = body;
     this.protection = protection;
     if (extraCerts != null)
     {
         this.extraCerts = new DerSequence(extraCerts);
     }
 }
 /**
  * Creates a new PkiMessage.
  *
  * @param header message header
  * @param body message body
  * @param protection message protection (may be null)
  * @param extraCerts extra certificates (may be null)
  */
 public PkiMessage(
     PkiHeader header,
     PkiBody body,
     DerBitString protection,
     CmpCertificate[] extraCerts)
 {
     this.header = header;
     this.body = body;
     this.protection = protection;
     if (extraCerts != null)
     {
         this.extraCerts = new DerSequence(extraCerts);
     }
 }
 private PkiMessage(Asn1Sequence seq)
 {
     this.header = PkiHeader.GetInstance(seq[0]);
     this.body   = PkiBody.GetInstance(seq[1]);
     for (int i = 2; i < seq.Count; i++)
     {
         Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)seq[i].ToAsn1Object();
         if (asn1TaggedObject.TagNo == 0)
         {
             this.protection = DerBitString.GetInstance(asn1TaggedObject, true);
         }
         else
         {
             this.extraCerts = Asn1Sequence.GetInstance(asn1TaggedObject, true);
         }
     }
 }
Exemple #6
0
        private PkiMessage(Asn1Sequence seq)
        {
            header = PkiHeader.GetInstance(seq[0]);
            body   = PkiBody.GetInstance(seq[1]);

            for (int pos = 2; pos < seq.Count; ++pos)
            {
                Asn1TaggedObject tObj = (Asn1TaggedObject)seq[pos].ToAsn1Object();

                if (tObj.TagNo == 0)
                {
                    protection = DerBitString.GetInstance(tObj, true);
                }
                else
                {
                    extraCerts = Asn1Sequence.GetInstance(tObj, true);
                }
            }
        }
        private PkiMessage(Asn1Sequence seq)
        {
            header = PkiHeader.GetInstance(seq[0]);
            body = PkiBody.GetInstance(seq[1]);

            for (int pos = 2; pos < seq.Count; ++pos)
            {
                Asn1TaggedObject tObj = (Asn1TaggedObject)seq[pos].ToAsn1Object();

                if (tObj.TagNo == 0)
                {
                    protection = DerBitString.GetInstance(tObj, true);
                }
                else
                {
                    extraCerts = Asn1Sequence.GetInstance(tObj, true);
                }
            }
        }
Exemple #8
0
 public PkiMessage(
     PkiHeader header,
     PkiBody body)
     : this(header, body, null, null)
 {
 }
 public ProtectedPart(PkiHeader header, PkiBody body)
 {
     this.header = header;
     this.body   = body;
 }
 private ProtectedPart(Asn1Sequence seq)
 {
     header = PkiHeader.GetInstance(seq[0]);
     body   = PkiBody.GetInstance(seq[1]);
 }
		public ProtectedPart(PkiHeader header, PkiBody body)
		{
			this.header = header;
			this.body = body;
		}
		private ProtectedPart(Asn1Sequence seq)
		{
			header = PkiHeader.GetInstance(seq[0]);
			body = PkiBody.GetInstance(seq[1]);
		}
Exemple #13
0
 private PkiBody(Asn1TaggedObject tagged)
 {
     this.tagNo = tagged.TagNo;
     this.body  = PkiBody.GetBodyForType(this.tagNo, tagged.GetObject());
 }
Exemple #14
0
 public PkiBody(int type, Asn1Encodable content)
 {
     this.tagNo = type;
     this.body  = PkiBody.GetBodyForType(type, content);
 }
 public PkiMessage(
     PkiHeader header,
     PkiBody body)
     : this(header, body, null, null)
 {
 }