示例#1
0
            private ResponseObject(
                CertificateID certId,
                CertificateStatus certStatus,
                DerGeneralizedTime thisUpdate,
                DerGeneralizedTime nextUpdate,
                X509Extensions extensions)
            {
                this.certId = certId;

                if (certStatus == null)
                {
                    this.certStatus = new CertStatus();
                }
                else if (certStatus is UnknownStatus)
                {
                    this.certStatus = new CertStatus(2, DerNull.Instance);
                }
                else
                {
                    RevokedStatus rs = (RevokedStatus)certStatus;
                    CrlReason     revocationReason = rs.HasRevocationReason
                                                ?       new CrlReason(rs.RevocationReason)
                                                :       null;

                    this.certStatus = new CertStatus(
                        new RevokedInfo(new DerGeneralizedTime(rs.RevocationTime), revocationReason));
                }

                this.thisUpdate = thisUpdate;
                this.nextUpdate = nextUpdate;

                this.extensions = extensions;
            }
示例#2
0
 /**
  * Add a response for a particular Certificate ID.
  *
  * @param certID certificate ID details
  * @param certStatus status of the certificate - null if okay
  * @param singleExtensions optional extensions
  */
 public void AddResponse(
     CertificateID certID,
     CertificateStatus certStatus,
     X509Extensions singleExtensions)
 {
     list.Add(new ResponseObject(certID, certStatus, DateTime.UtcNow, singleExtensions));
 }
示例#3
0
 public ResponseObject(
     CertificateID certId,
     CertificateStatus certStatus,
     DateTime thisUpdate,
     X509Extensions extensions)
     : this(certId, certStatus, new DerGeneralizedTime(thisUpdate), null, extensions)
 {
 }
示例#4
0
 /**
  * Add a response for a particular Certificate ID.
  *
  * @param certID certificate ID details
  * @param thisUpdate date this response was valid on
  * @param nextUpdate date when next update should be requested
  * @param certStatus status of the certificate - null if okay
  * @param singleExtensions optional extensions
  */
 public void AddResponse(
     CertificateID certID,
     CertificateStatus certStatus,
     DateTime thisUpdate,
     DateTime nextUpdate,
     X509Extensions singleExtensions)
 {
     list.Add(new ResponseObject(certID, certStatus, thisUpdate, nextUpdate, singleExtensions));
 }
示例#5
0
 /**
  * Add a response for a particular Certificate ID.
  *
  * @param certID certificate ID details
  * @param certStatus status of the certificate - null if okay
  */
 public void AddResponse(
     CertificateID certID,
     CertificateStatus certStatus)
 {
     list.Add(new ResponseObject(certID, certStatus, DateTime.UtcNow, null));
 }