예제 #1
0
		public TimeStampResp(
			PkiStatusInfo	pkiStatusInfo,
			ContentInfo		timeStampToken)
		{
			this.pkiStatusInfo = pkiStatusInfo;
			this.timeStampToken = timeStampToken;
		}
예제 #2
0
		private CertResponse(Asn1Sequence seq)
		{
			certReqId = DerInteger.GetInstance(seq[0]);
			status = PkiStatusInfo.GetInstance(seq[1]);

			if (seq.Count >= 3)
			{
				if (seq.Count == 3)
				{
					Asn1Encodable o = seq[2];
					if (o is Asn1OctetString)
					{
						rspInfo = Asn1OctetString.GetInstance(o);
					}
					else
					{
						certifiedKeyPair = CertifiedKeyPair.GetInstance(o);
					}
				}
				else
				{
					certifiedKeyPair = CertifiedKeyPair.GetInstance(seq[2]);
					rspInfo = Asn1OctetString.GetInstance(seq[3]);
				}
			}
		}
		public virtual RevRepContentBuilder Add(PkiStatusInfo status, CertId certId)
		{
			if (this.status.Count != this.revCerts.Count)
				throw new InvalidOperationException("status and revCerts sequence must be in common order");

			this.status.Add(status);
			this.revCerts.Add(certId);
			return this;
		}
예제 #4
0
		public virtual PkiStatusInfo[] GetStatus()
		{
			PkiStatusInfo[] results = new PkiStatusInfo[status.Count];
			for (int i = 0; i != results.Length; ++i)
			{
				results[i] = PkiStatusInfo.GetInstance(status[i]);
			}
			return results;
		}
예제 #5
0
 public virtual PkiStatusInfo[] GetStatus()
 {
     PkiStatusInfo[] results = new PkiStatusInfo[status.Count];
     for (int i = 0; i != results.Length; ++i)
     {
         results[i] = PkiStatusInfo.GetInstance(status[i]);
     }
     return(results);
 }
예제 #6
0
		private TimeStampResp(
			Asn1Sequence seq)
		{
			this.pkiStatusInfo = PkiStatusInfo.GetInstance(seq[0]);

			if (seq.Count > 1)
			{
				this.timeStampToken = ContentInfo.GetInstance(seq[1]);
			}
		}
예제 #7
0
        private CertStatus(Asn1Sequence seq)
        {
            certHash  = Asn1OctetString.GetInstance(seq[0]);
            certReqId = DerInteger.GetInstance(seq[1]);

            if (seq.Count > 2)
            {
                statusInfo = PkiStatusInfo.GetInstance(seq[2]);
            }
        }
예제 #8
0
		private CertStatus(Asn1Sequence seq)
		{
			certHash = Asn1OctetString.GetInstance(seq[0]);
			certReqId = DerInteger.GetInstance(seq[1]);

			if (seq.Count > 2)
			{
				statusInfo = PkiStatusInfo.GetInstance(seq[2]);
			}
		}
예제 #9
0
        public virtual RevRepContentBuilder Add(PkiStatusInfo status, CertId certId)
        {
            if (this.status.Count != this.revCerts.Count)
            {
                throw new InvalidOperationException("status and revCerts sequence must be in common order");
            }

            this.status.Add(status);
            this.revCerts.Add(certId);
            return(this);
        }
예제 #10
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;
		}
예제 #11
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;
        }
예제 #12
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);
				}
			}
		}
예제 #13
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);
                }
            }
        }
예제 #14
0
		public CertResponse(
			DerInteger			certReqId,
			PkiStatusInfo		status,
			CertifiedKeyPair	certifiedKeyPair,
			Asn1OctetString		rspInfo)
		{
			if (certReqId == null)
				throw new ArgumentNullException("certReqId");

			if (status == null)
				throw new ArgumentNullException("status");

			this.certReqId = certReqId;
			this.status = status;
			this.certifiedKeyPair = certifiedKeyPair;
			this.rspInfo = rspInfo;
		}
예제 #15
0
        public CertResponse(
            DerInteger certReqId,
            PkiStatusInfo status,
            CertifiedKeyPair certifiedKeyPair,
            Asn1OctetString rspInfo)
        {
            if (certReqId == null)
            {
                throw new ArgumentNullException("certReqId");
            }

            if (status == null)
            {
                throw new ArgumentNullException("status");
            }

            this.certReqId        = certReqId;
            this.status           = status;
            this.certifiedKeyPair = certifiedKeyPair;
            this.rspInfo          = rspInfo;
        }
예제 #16
0
		private KeyRecRepContent(Asn1Sequence seq)
		{
			status = PkiStatusInfo.GetInstance(seq[0]);

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

				switch (tObj.TagNo)
				{
					case 0:
						newSigCert = CmpCertificate.GetInstance(tObj.GetObject());
						break;
					case 1:
						caCerts = Asn1Sequence.GetInstance(tObj.GetObject());
						break;
					case 2:
						keyPairHist = Asn1Sequence.GetInstance(tObj.GetObject());
						break;
					default:
						throw new ArgumentException("unknown tag number: " + tObj.TagNo, "seq");
				}
			}
		}
예제 #17
0
		public CertStatus(byte[] certHash, BigInteger certReqId, PkiStatusInfo statusInfo)
		{
			this.certHash = new DerOctetString(certHash);
			this.certReqId = new DerInteger(certReqId);
			this.statusInfo = statusInfo;
		}
예제 #18
0
 public CertResponse(
     DerInteger certReqId,
     PkiStatusInfo status)
     : this(certReqId, status, null, null)
 {
 }
예제 #19
0
		public CertResponse(
			DerInteger certReqId,
			PkiStatusInfo status)
			: this(certReqId, status, null, null)
		{
		}
예제 #20
0
		public ErrorMsgContent(PkiStatusInfo pkiStatusInfo)
			: this(pkiStatusInfo, null, null)
		{
		}
예제 #21
0
 public CertStatus(byte[] certHash, BigInteger certReqId, PkiStatusInfo statusInfo)
 {
     this.certHash   = new DerOctetString(certHash);
     this.certReqId  = new DerInteger(certReqId);
     this.statusInfo = statusInfo;
 }
		public virtual RevRepContentBuilder Add(PkiStatusInfo status)
		{
			this.status.Add(status);
			return this;
		}
예제 #23
0
 public virtual RevRepContentBuilder Add(PkiStatusInfo status)
 {
     this.status.Add(status);
     return(this);
 }
예제 #24
0
 public ErrorMsgContent(PkiStatusInfo pkiStatusInfo)
     : this(pkiStatusInfo, null, null)
 {
 }