/** * Return the status object for the response - null indicates good. * * @return the status object for the response, null if it is good. */ public CertificateStatus getCertStatus() { CertStatus s = resp.getCertStatus(); if (s.getTagNo() == 0) { return null; // good } else if (s.getTagNo() == 1) { return new RevokedStatus(RevokedInfo.getInstance(s.getStatus())); } return new UnknownStatus(); }
/** * Return the status object for the response - null indicates good. * * @return the status object for the response, null if it is good. */ public Object getCertStatus() { CertStatus s = resp.getCertStatus(); if (s.getTagNo() == 0) { return null; // good } else if (s.getTagNo() == 1) { return new RevokedStatus(RevokedInfo.getInstance(s.getStatus())); } return new UnknownStatus(); }
public ResponseObject( CertificateID certId, CertificateStatus certStatus, Date thisUpdate, Date nextUpdate, Extensions extensions) { this.certId = certId; if (certStatus == null) { this.certStatus = new CertStatus(); } else if (certStatus instanceof UnknownStatus) { this.certStatus = new CertStatus(2, DERNull.INSTANCE); } else { RevokedStatus rs = (RevokedStatus)certStatus; if (rs.hasRevocationReason()) { this.certStatus = new CertStatus( new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason()))); } else { this.certStatus = new CertStatus( new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null)); } } this.thisUpdate = new DERGeneralizedTime(thisUpdate); if (nextUpdate != null) { this.nextUpdate = new DERGeneralizedTime(nextUpdate); } else { this.nextUpdate = null; } this.extensions = extensions; }
public RevokedStatus( RevokedInfo info) { this.info = info; }
public RevokedStatus( Date revocationDate, int reason) { this.info = new RevokedInfo(new ASN1GeneralizedTime(revocationDate), CRLReason.lookup(reason)); }
public ResponseObject( CertificateID certId, CertificateStatus certStatus, Date thisUpdate, Date nextUpdate, X509Extensions extensions) { this.certId = certId; if (certStatus == null) { this.certStatus = new CertStatus(); } else if (certStatus instanceof UnknownStatus) { this.certStatus = new CertStatus(2, DERNull.INSTANCE); } else { RevokedStatus rs = (RevokedStatus)certStatus; if (rs.hasRevocationReason()) { this.certStatus = new CertStatus( new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason()))); } else { this.certStatus = new CertStatus( new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null)); } } this.thisUpdate = new DERGeneralizedTime(thisUpdate); if (nextUpdate != null) { this.nextUpdate = new DERGeneralizedTime(nextUpdate); } else { this.nextUpdate = null; } this.extensions = extensions; }