question: public void valid ( Date now ) throws CertificateNotYetValidException , CertificateExpiredException { Objects . requireNonNull ( now ) ; if ( notBefore != null && notBefore . after ( now ) ) { throw new CertificateNotYetValidException ( "NotBefore: " + notBefore . toString ( ) ) ; } if ( notAfter != null && notAfter . before ( now ) ) { throw new CertificateExpiredException ( "NotAfter: " + notAfter . toString ( ) ) ; } }
target:  Verify that that the passed time is within the validity period.