@Test public void testSelfSignedCertificateWithNotValidBeforeAndAfterDates() throws Exception { final ZonedDateTime notValidBeforeDate = ZonedDateTime.of(2017, 10, 31, 23, 59, 59, 0, ZoneOffset.UTC); final ZonedDateTime notValidAfterDate = ZonedDateTime.of(2027, 10, 31, 23, 59, 59, 0, ZoneOffset.UTC); SelfSignedX509CertificateAndSigningKey selfSignedX509CertificateAndSigningKey = populateBasicBuilder() .setNotValidBefore(notValidBeforeDate) .setNotValidAfter(notValidAfterDate) .build(); X509Certificate certificate = selfSignedX509CertificateAndSigningKey.getSelfSignedCertificate(); assertEquals(Date.from(notValidBeforeDate.toInstant()), certificate.getNotBefore()); assertEquals(Date.from(notValidAfterDate.toInstant()), certificate.getNotAfter()); }
public X509Certificate getSelfSignedCertificate() { return selfSignedcertificate; }
SelfSignedX509CertificateAndSigningKey { public X509Certificate getSelfSignedCertificate() { return selfSignedcertificate; } }
SelfSignedX509CertificateAndSigningKey { public X509Certificate getSelfSignedCertificate() { return selfSignedcertificate; } private  SelfSignedX509CertificateAndSigningKey(Builder builder); }
SelfSignedX509CertificateAndSigningKey { public X509Certificate getSelfSignedCertificate() { return selfSignedcertificate; } private  SelfSignedX509CertificateAndSigningKey(Builder builder); X509Certificate getSelfSignedCertificate(); PrivateKey getSigningKey(); PKCS10CertificateSigningRequest generatePKCS10CertificateSigningRequest(); static Builder builder(); }
SelfSignedX509CertificateAndSigningKey { public X509Certificate getSelfSignedCertificate() { return selfSignedcertificate; } private  SelfSignedX509CertificateAndSigningKey(Builder builder); X509Certificate getSelfSignedCertificate(); PrivateKey getSigningKey(); PKCS10CertificateSigningRequest generatePKCS10CertificateSigningRequest(); static Builder builder();  }