@Test public void testSameKeyAndKeystorePasswordWithKeyPasswordSpecified() throws CommandLineParseException { String testPassword = "testPassword"; tlsToolkitStandaloneCommandLine.parse("-K", testPassword, "-n", TlsConfig.DEFAULT_HOSTNAME); List<InstanceDefinition> instanceDefinitions = tlsToolkitStandaloneCommandLine.createConfig().getInstanceDefinitions(); assertNotEquals(instanceDefinitions.get(0).getKeyStorePassword(), instanceDefinitions.get(0).getKeyPassword()); assertEquals(1, instanceDefinitions.size()); assertEquals(testPassword, instanceDefinitions.get(0).getKeyPassword()); }
public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; }
TlsToolkitStandaloneCommandLine extends BaseCommandLine { public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; } }
TlsToolkitStandaloneCommandLine extends BaseCommandLine { public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; } TlsToolkitStandaloneCommandLine(); protected  TlsToolkitStandaloneCommandLine(PasswordUtil passwordUtil); }
TlsToolkitStandaloneCommandLine extends BaseCommandLine { public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; } TlsToolkitStandaloneCommandLine(); protected  TlsToolkitStandaloneCommandLine(PasswordUtil passwordUtil); static void main(String[] args); StandaloneConfig createConfig(); }
TlsToolkitStandaloneCommandLine extends BaseCommandLine { public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; } TlsToolkitStandaloneCommandLine(); protected  TlsToolkitStandaloneCommandLine(PasswordUtil passwordUtil); static void main(String[] args); StandaloneConfig createConfig(); static final String OUTPUT_DIRECTORY_ARG; static final String NIFI_PROPERTIES_FILE_ARG; static final String KEY_STORE_PASSWORD_ARG; static final String TRUST_STORE_PASSWORD_ARG; static final String KEY_PASSWORD_ARG; static final String HOSTNAMES_ARG; static final String OVERWRITE_ARG; static final String CLIENT_CERT_DN_ARG; static final String CLIENT_CERT_PASSWORD_ARG; static final String GLOBAL_PORT_SEQUENCE_ARG; static final String NIFI_DN_PREFIX_ARG; static final String NIFI_DN_SUFFIX_ARG; static final String SUBJECT_ALTERNATIVE_NAMES; static final String DEFAULT_OUTPUT_DIRECTORY; static final String DESCRIPTION; }