@Test public void validateCertificates() throws Exception { Certificate[] chain = provider.getKeyStore().getCertificateChain("kangaroo"); assertEquals(1, chain.length); X509Certificate cert = (X509Certificate) chain[0]; assertNotNull(cert); Principal iss = cert.getIssuerDN(); Principal sub = cert.getSubjectDN(); assertEquals("CN=localhost, OU=Kangaroo, O=Kangaroo, " + "L=Seattle, ST=Washington, C=US", iss.getName()); assertEquals("CN=localhost, OU=Kangaroo, O=Kangaroo, " + "L=Seattle, ST=Washington, C=US", sub.getName()); }
public KeyStore getKeyStore() { if (!doesKeystoreExist()) { generateKeystore(); } return generatedProvider.getKeyStore(); }
GeneratedKeystoreProvider implements IKeystoreProvider { public KeyStore getKeyStore() { if (!doesKeystoreExist()) { generateKeystore(); } return generatedProvider.getKeyStore(); } }
GeneratedKeystoreProvider implements IKeystoreProvider { public KeyStore getKeyStore() { if (!doesKeystoreExist()) { generateKeystore(); } return generatedProvider.getKeyStore(); } GeneratedKeystoreProvider(final String workingDirectory);  GeneratedKeystoreProvider(final String workingDirectory,
                                     final String keystorePass,
                                     final String certificatePass,
                                     final String alias); }
GeneratedKeystoreProvider implements IKeystoreProvider { public KeyStore getKeyStore() { if (!doesKeystoreExist()) { generateKeystore(); } return generatedProvider.getKeyStore(); } GeneratedKeystoreProvider(final String workingDirectory);  GeneratedKeystoreProvider(final String workingDirectory,
                                     final String keystorePass,
                                     final String certificatePass,
                                     final String alias); KeyStore getKeyStore(); @Override void writeTo(final OutputStream outputStream); }
GeneratedKeystoreProvider implements IKeystoreProvider { public KeyStore getKeyStore() { if (!doesKeystoreExist()) { generateKeystore(); } return generatedProvider.getKeyStore(); } GeneratedKeystoreProvider(final String workingDirectory);  GeneratedKeystoreProvider(final String workingDirectory,
                                     final String keystorePass,
                                     final String certificatePass,
                                     final String alias); KeyStore getKeyStore(); @Override void writeTo(final OutputStream outputStream);  }