@Test public void testClientPasswordMulti() throws CommandLineParseException { String testCn = "OU=NIFI,CN=testuser"; String testCn2 = "OU=NIFI,CN=testuser2"; String testPass1 = "testPass1"; String testPass2 = "testPass2"; tlsToolkitStandaloneCommandLine.parse("-C", testCn, "-C", testCn2, "-B", testPass1, "-B", testPass2); StandaloneConfig standaloneConfig = tlsToolkitStandaloneCommandLine.createConfig(); List<String> clientDns = standaloneConfig.getClientDns(); assertEquals(2, clientDns.size()); assertEquals(testCn, clientDns.get(0)); assertEquals(testCn2, clientDns.get(1)); List<String> clientPasswords = standaloneConfig.getClientPasswords(); assertEquals(2, clientPasswords.size()); assertEquals(testPass1, clientPasswords.get(0)); assertEquals(testPass2, clientPasswords.get(1)); }
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; }