/** * Request a validity period for the certificate. Either, but not both, of the date parameters may be null. * * @param notBeforeDate not before date for certificate requested. * @param notAfterDate not after date for the certificate requested. * * @return the current builder. */ public CertificateRequestMessageBuilder setValidity(Date notBeforeDate, Date notAfterDate) { templateBuilder.setValidity(new OptionalValidity(createTime(notBeforeDate), createTime(notAfterDate))); return this; }