public String toString() { return getTime(); } }
public String toString() { return getTime(); } }
public void checkValidity( Date date) throws CertificateExpiredException, CertificateNotYetValidException { if (date.getTime() > this.getNotAfter().getTime()) // for other VM compatibility { throw new CertificateExpiredException("certificate expired on " + c.getEndDate().getTime()); } if (date.getTime() < this.getNotBefore().getTime()) { throw new CertificateNotYetValidException("certificate not valid till " + c.getStartDate().getTime()); } }
public void checkValidity( Date date) throws CertificateExpiredException, CertificateNotYetValidException { if (date.getTime() > this.getNotAfter().getTime()) // for other VM compatibility { throw new CertificateExpiredException("certificate expired on " + c.getEndDate().getTime()); } if (date.getTime() < this.getNotBefore().getTime()) { throw new CertificateNotYetValidException("certificate not valid till " + c.getStartDate().getTime()); } }
public CertificateList getBcCrl(BigInteger crlNumber) throws OperationException { LOG.info(" START getCrl: ca={}, crlNumber={}", caIdent.getName(), crlNumber); boolean successful = false; try { byte[] encodedCrl = certstore.getEncodedCrl(caIdent, crlNumber); if (encodedCrl == null) { return null; } try { CertificateList crl = CertificateList.getInstance(encodedCrl); successful = true; if (LOG.isInfoEnabled()) { LOG.info("SUCCESSFUL getCrl: ca={}, thisUpdate={}", caIdent.getName(), crl.getThisUpdate().getTime()); } return crl; } catch (RuntimeException ex) { throw new OperationException(SYSTEM_FAILURE, ex); } } finally { if (!successful) { LOG.info(" FAILED getCrl: ca={}", caIdent.getName()); } } } // method getCrl
public X509CRL getCrl(BigInteger crlNumber) throws OperationException { LOG.info(" START getCrl: ca={}, crlNumber={}", caIdent.getName(), crlNumber); boolean successful = false; try { byte[] encodedCrl = certstore.getEncodedCrl(caIdent, crlNumber); if (encodedCrl == null) { return null; } try { X509CRL crl = X509Util.parseCrl(encodedCrl); successful = true; if (LOG.isInfoEnabled()) { String timeStr = new Time(crl.getThisUpdate()).getTime(); LOG.info("SUCCESSFUL getCrl: ca={}, thisUpdate={}", caIdent.getName(), timeStr); } return crl; } catch (CRLException | CertificateException ex) { throw new OperationException(SYSTEM_FAILURE, ex); } catch (RuntimeException ex) { throw new OperationException(SYSTEM_FAILURE, ex); } } finally { if (!successful) { LOG.info(" FAILED getCrl: ca={}", caIdent.getName()); } } } // method getCrl