예제 #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));
 }