@Override protected boolean process() { Date notBefore = certificate.getNotBefore(); Date notAfter = certificate.getNotAfter(); return (notBefore != null && (currentTime.compareTo(notBefore) >= 0)) && (notAfter != null && (currentTime.compareTo(notAfter) <= 0)); }
@Override protected String getAdditionalInfo() { SimpleDateFormat sdf = new SimpleDateFormat(AdditionalInfo.DATE_FORMAT); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); String notBeforeStr = certificate.getNotBefore() == null ? " ? " : sdf.format(certificate.getNotBefore()); String notAfterStr = certificate.getNotAfter() == null ? " ? " : sdf.format(certificate.getNotAfter()); Object[] params = new Object[] { notBeforeStr, notAfterStr }; return MessageFormat.format(AdditionalInfo.CERTIFICATE_VALIDITY, params); }
@Override protected boolean process() { return bestSignatureTime.after(signingCertificate.getNotBefore()) && bestSignatureTime.before(signingCertificate.getNotAfter()); }
private boolean isRevocationNoNeedCheck(CertificateWrapper certificate) { if (certificate.isIdPkixOcspNoCheck()) { return currentTime.compareTo(certificate.getNotBefore()) >= 0 && currentTime.compareTo(certificate.getNotAfter()) <= 0; } return false; }
private Date getExpirationDateForSigningCertificate(SignatureWrapper currentSignature) { CertificateWrapper signingCertificate = diagnosticData.getUsedCertificateById(currentSignature.getSigningCertificateId()); if (signingCertificate != null) { return signingCertificate.getNotAfter(); } return null; }
private boolean isConsistant(CertificateWrapper certificate, RevocationWrapper revocationData) { Date certNotBefore = certificate.getNotBefore(); Date certNotAfter = certificate.getNotAfter(); Date thisUpdate = revocationData.getThisUpdate();
intervalNotBefore = certificate.getNotBefore(); if (intervalNotAfter == null || intervalNotAfter.after(certificate.getNotAfter())) { intervalNotAfter = certificate.getNotAfter();
item.setNotAfter(certificate.getNotAfter()); item.setKeyUsages(certificate.getKeyUsages()); item.setExtendedKeyUsages(getReadable(certificate.getExtendedKeyUsages()));