예제 #1
0
        private PollRepContent(Asn1Sequence seq)
        {
            certReqId  = DerInteger.GetInstance(seq[0]);
            checkAfter = DerInteger.GetInstance(seq[1]);

            if (seq.Count > 2)
            {
                reason = PkiFreeText.GetInstance(seq[2]);
            }
        }
예제 #2
0
        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");
                }
            }
        }
예제 #3
0
        public ErrorMsgContent(
            PkiStatusInfo pkiStatusInfo,
            DerInteger errorCode,
            PkiFreeText errorDetails)
        {
            if (pkiStatusInfo == null)
            {
                throw new ArgumentNullException("pkiStatusInfo");
            }

            this.pkiStatusInfo = pkiStatusInfo;
            this.errorCode     = errorCode;
            this.errorDetails  = errorDetails;
        }
예제 #4
0
        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);
                }
            }
        }
예제 #5
0
 public virtual PkiHeaderBuilder SetFreeText(PkiFreeText text)
 {
     freeText = text;
     return(this);
 }