Code example for Date

Methods: after, before

0
     * @param date the date of interest. 
     * @return true if the certificate is valid, false otherwise. 
     */ 
    public boolean isValidOn(Date date)
    { 
        return !date.before(x509Certificate.getStartDate().getDate()) && !date.after(x509Certificate.getEndDate().getDate());
    } 
 
    /** 
     * Validate the signature on the certificate in this holder. 
     * 
     * @param verifierProvider a ContentVerifierProvider that can generate a verifier for the signature. 
     * @return true if the signature is valid, false otherwise. 
     * @throws CertException if the signature cannot be processed or is inappropriate. 
     */ 
    public boolean isSignatureValid(ContentVerifierProvider verifierProvider)
        throws CertException 
    { 
        TBSCertificate tbsCert = x509Certificate.getTBSCertificate();
 
        if (!CertUtils.isAlgIdEqual(tbsCert.getSignature(), x509Certificate.getSignatureAlgorithm()))