public static void createRootKeyPair( String keyStoreFile, String keyStorePasswordProperty, String trustStoreFile, String trustStorePasswordProperty, String credentialProvider) throws Exception { char[] keyStorePassword = ProviderUtil.getPassword(credentialProvider, keyStorePasswordProperty); char[] trustStorePassword = ProviderUtil.getPassword(credentialProvider, trustStorePasswordProperty); createSelfSignedCert(keyStoreFile, "root", keyStorePassword); createPublicCert(trustStoreFile, "root", keyStoreFile, keyStorePassword, trustStorePassword); }
public static void createServerKeyPair( String keyStoreFile, String keyStorePasswordProperty, String rootKeyStoreFile, String rootKeyStorePasswordProperty, String credentialProvider, String hostname) throws Exception { char[] keyStorePassword = ProviderUtil.getPassword(credentialProvider, keyStorePasswordProperty); char[] rootKeyStorePassword = ProviderUtil.getPassword(credentialProvider, rootKeyStorePasswordProperty); createSignedCert( keyStoreFile, "server", hostname, keyStorePassword, rootKeyStoreFile, rootKeyStorePassword); }