X509Certificate.checkValidity

Checks that the certificate is currently valid. It is if the current date and time are within the validity period given in the certificate. <p> The validity period consists of two date/time values: the first and last dates (and times) on which the certificate is valid. It is defined in ASN.1 as: <pre> validity Validity

Validity ::= SEQUENCE { notBefore CertificateValidityDate, notAfter CertificateValidityDate }

CertificateValidityDate ::= CHOICE { utcTime UTCTime, generalTime GeneralizedTime } </pre>

@exception CertificateExpiredException if the certificate has expired. @exception CertificateNotYetValidException if the certificate is not yet valid.

  1. void checkValidity()
    class X509Certificate
    abstract
    void
    checkValidity
    ()
  2. void checkValidity(Date date)
  3. X500Principal subjectX500Principal;
  4. X500Principal issuerX500Principal;

Meta