private PollRepContent(Asn1Sequence seq) { certReqId = DerInteger.GetInstance(seq[0]); checkAfter = DerInteger.GetInstance(seq[1]); if (seq.Count > 2) { reason = PkiFreeText.GetInstance(seq[2]); } }
private PkiHeader(Asn1Sequence seq) { pvno = DerInteger.GetInstance(seq[0]); sender = GeneralName.GetInstance(seq[1]); recipient = GeneralName.GetInstance(seq[2]); for (int pos = 3; pos < seq.Count; ++pos) { Asn1TaggedObject tObj = (Asn1TaggedObject)seq[pos]; switch (tObj.TagNo) { case 0: messageTime = DerGeneralizedTime.GetInstance(tObj, true); break; case 1: protectionAlg = AlgorithmIdentifier.GetInstance(tObj, true); break; case 2: senderKID = Asn1OctetString.GetInstance(tObj, true); break; case 3: recipKID = Asn1OctetString.GetInstance(tObj, true); break; case 4: transactionID = Asn1OctetString.GetInstance(tObj, true); break; case 5: senderNonce = Asn1OctetString.GetInstance(tObj, true); break; case 6: recipNonce = Asn1OctetString.GetInstance(tObj, true); break; case 7: freeText = PkiFreeText.GetInstance(tObj, true); break; case 8: generalInfo = Asn1Sequence.GetInstance(tObj, true); break; default: throw new ArgumentException("unknown tag number: " + tObj.TagNo, "seq"); } } }
public ErrorMsgContent( PkiStatusInfo pkiStatusInfo, DerInteger errorCode, PkiFreeText errorDetails) { if (pkiStatusInfo == null) { throw new ArgumentNullException("pkiStatusInfo"); } this.pkiStatusInfo = pkiStatusInfo; this.errorCode = errorCode; this.errorDetails = errorDetails; }
private ErrorMsgContent(Asn1Sequence seq) { pkiStatusInfo = PkiStatusInfo.GetInstance(seq[0]); for (int pos = 1; pos < seq.Count; ++pos) { Asn1Encodable ae = seq[pos]; if (ae is DerInteger) { errorCode = DerInteger.GetInstance(ae); } else { errorDetails = PkiFreeText.GetInstance(ae); } } }
public virtual PkiHeaderBuilder SetFreeText(PkiFreeText text) { freeText = text; return(this); }