コード例 #1
0
ファイル: PKIStatusInfo.cs プロジェクト: vincent-deng/Payment
 public PkiStatusInfo(
     int status,
     PkiFreeText statusString,
     PkiFailureInfo failInfo)
 {
     this.status       = new DerInteger(status);
     this.statusString = statusString;
     this.failInfo     = failInfo;
 }
コード例 #2
0
        private PollRepContent(Asn1Sequence seq)
        {
            certReqId  = DerInteger.GetInstance(seq[0]);
            checkAfter = DerInteger.GetInstance(seq[1]);

            if (seq.Count > 2)
            {
                reason = PkiFreeText.GetInstance(seq[2]);
            }
        }
コード例 #3
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");
                }
            }
        }
コード例 #4
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;
        }
コード例 #5
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);
                }
            }
        }
コード例 #6
0
ファイル: PKIHeaderBuilder.cs プロジェクト: jkloop45/Payment
 public virtual PkiHeaderBuilder SetFreeText(PkiFreeText text)
 {
     freeText = text;
     return(this);
 }