From ba223bb450f8751974d75f26fd6421aecf22f90a Mon Sep 17 00:00:00 2001 From: Chao Wang Date: Thu, 23 Jun 2022 12:23:45 +0800 Subject: [PATCH] ELY-2354 remove IBM related changes due to unavailable security providers and algorithms since IBM Semeru Runtime Certified Edition, Version 11 --- .../util/GSSCredentialSecurityFactory.java | 18 +++------ .../gssapi/GSSCredentialSecurityFactory.java | 19 +++------ .../MaskedPasswordSSLAuthenticationTest.java | 3 +- .../security/sasl/gssapi/JaasUtil.java | 33 +++++----------- .../security/ssl/SSLAuthenticationTest.java | 3 +- .../ssl/SSLv2HelloAuthenticationTest.java | 29 +++----------- .../security/ssl/TLS13AuthenticationTest.java | 5 +-- .../tool/CredentialStoreCommandTest.java | 6 --- .../security/tool/VaultCommandTest.java | 37 +----------------- .../resources/bulk-vault-conversion-desc-ibm | 23 ----------- .../vault-v1-more/vault-jceks-ibm.keystore | Bin 379 -> 0 bytes 11 files changed, 30 insertions(+), 146 deletions(-) delete mode 100644 tool/src/test/resources/bulk-vault-conversion-desc-ibm delete mode 100644 tool/src/test/resources/vault-v1-more/vault-jceks-ibm.keystore diff --git a/auth/util/src/main/java/org/wildfly/security/auth/util/GSSCredentialSecurityFactory.java b/auth/util/src/main/java/org/wildfly/security/auth/util/GSSCredentialSecurityFactory.java index 3b0338ca90a..0d751766a44 100644 --- a/auth/util/src/main/java/org/wildfly/security/auth/util/GSSCredentialSecurityFactory.java +++ b/auth/util/src/main/java/org/wildfly/security/auth/util/GSSCredentialSecurityFactory.java @@ -67,9 +67,7 @@ @Deprecated public final class GSSCredentialSecurityFactory implements SecurityFactory { - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); private static final String KRB5LoginModule = "com.sun.security.auth.module.Krb5LoginModule"; - private static final String IBMKRB5LoginModule = "com.ibm.security.auth.module.Krb5LoginModule"; private static final long ONE_SECOND = 1000; public static final Oid KERBEROS_V5; @@ -470,16 +468,10 @@ private Configuration createConfiguration() throws IOException { } options.put("principal", principal); - if (IS_IBM) { - options.put("noAddress", "true"); - options.put("credsType", (isServer && !obtainKerberosTicket) ? "acceptor" : "both"); - if (keyTab != null) options.put("useKeytab", keyTab.toURI().toURL().toString()); - } else { - options.put("storeKey", "true"); - options.put("useKeyTab", "true"); - if (keyTab != null) options.put("keyTab", keyTab.getAbsolutePath()); - options.put("isInitiator", (isServer && !obtainKerberosTicket) ? "false" : "true"); - } + options.put("storeKey", "true"); + options.put("useKeyTab", "true"); + if (keyTab != null) options.put("keyTab", keyTab.getAbsolutePath()); + options.put("isInitiator", (isServer && !obtainKerberosTicket) ? "false" : "true"); if (this.options != null) { options.putAll(this.options); @@ -488,7 +480,7 @@ private Configuration createConfiguration() throws IOException { log.tracef("Created LoginContext configuration: %s", options.toString()); final AppConfigurationEntry[] aceArray = new AppConfigurationEntry[] { - new AppConfigurationEntry(IS_IBM ? IBMKRB5LoginModule : KRB5LoginModule, REQUIRED, options) + new AppConfigurationEntry(KRB5LoginModule, REQUIRED, options) }; return new Configuration() { diff --git a/mechanism/gssapi/src/main/java/org/wildfly/security/mechanism/gssapi/GSSCredentialSecurityFactory.java b/mechanism/gssapi/src/main/java/org/wildfly/security/mechanism/gssapi/GSSCredentialSecurityFactory.java index af380c6779d..03566163be3 100644 --- a/mechanism/gssapi/src/main/java/org/wildfly/security/mechanism/gssapi/GSSCredentialSecurityFactory.java +++ b/mechanism/gssapi/src/main/java/org/wildfly/security/mechanism/gssapi/GSSCredentialSecurityFactory.java @@ -65,9 +65,7 @@ */ public final class GSSCredentialSecurityFactory implements SecurityFactory { - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); private static final String KRB5LoginModule = "com.sun.security.auth.module.Krb5LoginModule"; - private static final String IBMKRB5LoginModule = "com.ibm.security.auth.module.Krb5LoginModule"; private static final long ONE_SECOND = 1000; public static final Oid KERBEROS_V5; @@ -467,17 +465,10 @@ private Configuration createConfiguration() throws IOException { options.put("debug", "true"); } options.put("principal", principal); - - if (IS_IBM) { - options.put("noAddress", "true"); - options.put("credsType", (isServer && !obtainKerberosTicket) ? "acceptor" : "both"); - if (keyTab != null) options.put("useKeytab", keyTab.toURI().toURL().toString()); - } else { - options.put("storeKey", "true"); - options.put("useKeyTab", "true"); - if (keyTab != null) options.put("keyTab", keyTab.getAbsolutePath()); - options.put("isInitiator", (isServer && !obtainKerberosTicket) ? "false" : "true"); - } + options.put("storeKey", "true"); + options.put("useKeyTab", "true"); + if (keyTab != null) options.put("keyTab", keyTab.getAbsolutePath()); + options.put("isInitiator", (isServer && !obtainKerberosTicket) ? "false" : "true"); if (this.options != null) { options.putAll(this.options); @@ -486,7 +477,7 @@ private Configuration createConfiguration() throws IOException { log.tracef("Created LoginContext configuration: %s", options.toString()); final AppConfigurationEntry[] aceArray = new AppConfigurationEntry[] { - new AppConfigurationEntry(IS_IBM ? IBMKRB5LoginModule : KRB5LoginModule, REQUIRED, options) + new AppConfigurationEntry(KRB5LoginModule, REQUIRED, options) }; return new Configuration() { diff --git a/tests/base/src/test/java/org/wildfly/security/auth/client/MaskedPasswordSSLAuthenticationTest.java b/tests/base/src/test/java/org/wildfly/security/auth/client/MaskedPasswordSSLAuthenticationTest.java index 0618907b654..119548f4c4b 100644 --- a/tests/base/src/test/java/org/wildfly/security/auth/client/MaskedPasswordSSLAuthenticationTest.java +++ b/tests/base/src/test/java/org/wildfly/security/auth/client/MaskedPasswordSSLAuthenticationTest.java @@ -72,7 +72,6 @@ */ public class MaskedPasswordSSLAuthenticationTest { - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); private static final char[] PASSWORD = "Elytron".toCharArray(); private static final String JKS_LOCATION = "./target/test-classes/jks"; @@ -85,7 +84,7 @@ public class MaskedPasswordSSLAuthenticationTest { * @return the initialised key manager. */ private static X509ExtendedKeyManager getKeyManager(final String keystorePath) throws Exception { - KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(IS_IBM ? "IbmX509" : "SunX509"); + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509"); keyManagerFactory.init(createKeyStore(keystorePath), PASSWORD); for (KeyManager current : keyManagerFactory.getKeyManagers()) { diff --git a/tests/base/src/test/java/org/wildfly/security/sasl/gssapi/JaasUtil.java b/tests/base/src/test/java/org/wildfly/security/sasl/gssapi/JaasUtil.java index 1f86497e3a5..0835c6fa7fe 100644 --- a/tests/base/src/test/java/org/wildfly/security/sasl/gssapi/JaasUtil.java +++ b/tests/base/src/test/java/org/wildfly/security/sasl/gssapi/JaasUtil.java @@ -46,8 +46,6 @@ public class JaasUtil { private static Logger log = Logger.getLogger(JaasUtil.class); - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); - public static Subject loginClient() throws LoginException { log.debug("loginClient"); return login("jduke", "theduke".toCharArray(), false, null); @@ -87,15 +85,9 @@ public AppConfigurationEntry[] getAppConfigurationEntry(String name) { options.put("debug", "true"); options.put("refreshKrb5Config", "true"); - if (IS_IBM) { - options.put("noAddress", "true"); - options.put("credsType", server ? "acceptor" : "initiator"); - entries[0] = new AppConfigurationEntry("com.ibm.security.auth.module.Krb5LoginModule", REQUIRED, options); - } else { - options.put("storeKey", "true"); - options.put("isInitiator", server ? "false" : "true"); - entries[0] = new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule", REQUIRED, options); - } + options.put("storeKey", "true"); + options.put("isInitiator", server ? "false" : "true"); + entries[0] = new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule", REQUIRED, options); return entries; } @@ -118,19 +110,12 @@ public AppConfigurationEntry[] getAppConfigurationEntry(String name) { options.put("refreshKrb5Config", "true"); options.put("principal", principal); - if (IS_IBM) { - options.put("useKeytab", keyTabFile); - options.put("noAddress", "true"); - options.put("credsType", "acceptor"); - entries[0] = new AppConfigurationEntry("com.ibm.security.auth.module.Krb5LoginModule", REQUIRED, options); - } else { - options.put("useKeyTab", "true"); - options.put("keyTab", keyTabFile); - options.put("doNotPrompt", "true"); - options.put("storeKey", "true"); - options.put("isInitiator", "false"); - entries[0] = new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule", REQUIRED, options); - } + options.put("useKeyTab", "true"); + options.put("keyTab", keyTabFile); + options.put("doNotPrompt", "true"); + options.put("storeKey", "true"); + options.put("isInitiator", "false"); + entries[0] = new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule", REQUIRED, options); return entries; } diff --git a/tests/base/src/test/java/org/wildfly/security/ssl/SSLAuthenticationTest.java b/tests/base/src/test/java/org/wildfly/security/ssl/SSLAuthenticationTest.java index d685ab9eacd..13ebb5202c8 100644 --- a/tests/base/src/test/java/org/wildfly/security/ssl/SSLAuthenticationTest.java +++ b/tests/base/src/test/java/org/wildfly/security/ssl/SSLAuthenticationTest.java @@ -103,7 +103,6 @@ // has dependency on wildfly-elytron-client, wildfly-elytron-x500-cert, wildfly-elytron-realm, wildly-elytron-x500-deprecated public class SSLAuthenticationTest { - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); private static final int OCSP_PORT = 4854; private final int TESTING_PORT = 18201; private static final char[] PASSWORD = "Elytron".toCharArray(); @@ -132,7 +131,7 @@ public class SSLAuthenticationTest { * @return the initialised key manager. */ private static X509ExtendedKeyManager getKeyManager(final String keystorePath) throws Exception { - KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(IS_IBM ? "IbmX509" : "SunX509"); + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509"); keyManagerFactory.init(createKeyStore(keystorePath), PASSWORD); for (KeyManager current : keyManagerFactory.getKeyManagers()) { diff --git a/tests/base/src/test/java/org/wildfly/security/ssl/SSLv2HelloAuthenticationTest.java b/tests/base/src/test/java/org/wildfly/security/ssl/SSLv2HelloAuthenticationTest.java index e3f347ddf96..9e61933f29a 100644 --- a/tests/base/src/test/java/org/wildfly/security/ssl/SSLv2HelloAuthenticationTest.java +++ b/tests/base/src/test/java/org/wildfly/security/ssl/SSLv2HelloAuthenticationTest.java @@ -66,7 +66,6 @@ import javax.security.auth.x500.X500Principal; import org.junit.AfterClass; -import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Test; import org.wildfly.security.WildFlyElytronProvider; @@ -89,7 +88,6 @@ */ public class SSLv2HelloAuthenticationTest { - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); private static final char[] PASSWORD = "Elytron".toCharArray(); private static final String CA_JKS_LOCATION = "./target/test-classes/ca/jks"; private static File ladybirdFile = null; @@ -158,11 +156,6 @@ public static void cleanUp(){ */ @Test public void testOneWaySSLv2HelloProtocolMatch() throws Exception { - - Assume.assumeFalse("Skipping testTwoWaySSlv2HelloProtocolMatch test " + - "as IBM JDK does not support SSLv2Hello on the " + - "client side", IS_IBM); - ArrayList list = new ArrayList<>(); list.add(Protocol.forName("SSLv2Hello")); list.add(Protocol.forName("TLSv1")); @@ -188,11 +181,6 @@ public void testOneWaySSLv2HelloProtocolMatch() throws Exception { */ @Test public void testTwoWaySSLv2HelloProtocolMatch() throws Exception { - - Assume.assumeFalse("Skipping testTwoWaySSlv2HelloProtocolMatch test " + - "as IBM JDK does not support SSLv2Hello on the " + - "client side", IS_IBM); - List list = new ArrayList<>(); list.add(Protocol.forName("SSLv2Hello")); list.add(Protocol.forName("TLSv1")); @@ -231,7 +219,7 @@ public void testTwoWaySSLv2HelloNotEnabled() throws Exception { .setNeedClientAuth(true) .build().create(); - String[] enabledProtocols = IS_IBM ? new String[]{"TLSv1", "TLSv1.1", "TLSv1.2"} : new String[]{"TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}; + String[] enabledProtocols = new String[]{"TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}; SecurityIdentity identity = performConnectionTest(serverContext, "protocol://two-way-no-sslv2hello.org", @@ -261,10 +249,8 @@ public void testTwoWaySSLv2HelloNoClientSupport() throws Exception { .setProtocolSelector(ProtocolSelector.empty().add(EnumSet.copyOf(list))) .build().create(); - // For IBM JDK, although the server accepts SSLv2Hello messages, it will not display it in its list - // of enabled protocols. - String[] enabledServerProtocols = IS_IBM ? new String[]{"TLSv1"} : new String[]{"SSLv2Hello", "TLSv1"} ; - String[] enabledClientProtocols = IS_IBM ? new String[]{"TLSv1", "TLSv1.1", "TLSv1.2"}: new String[]{"TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}; // default protocols enabled + String[] enabledServerProtocols = new String[]{"SSLv2Hello", "TLSv1"}; + String[] enabledClientProtocols = new String[]{"TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}; // default protocols enabled SecurityIdentity identity = performConnectionTest(serverContext, "protocol://two-way-no-sslv2hello.org", @@ -282,11 +268,6 @@ public void testTwoWaySSLv2HelloNoClientSupport() throws Exception { */ @Test public void testTwoWaySSlv2HelloNoServerSupport() throws Exception { - - Assume.assumeFalse("Skipping testTwoWaySSLv2HelloNoServerSupport test " + - "as IBM JDK does not support SSLv2Hello on the " + - "client side", IS_IBM); - List list = new ArrayList<>(); list.add(Protocol.forName("TLSv1.1")); @@ -375,7 +356,7 @@ private SecurityIdentity performConnectionTest(SSLContext serverContext, String * @return the initialised key manager. */ private static X509ExtendedKeyManager getKeyManager(final String keystorePath) throws Exception { - KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(IS_IBM ? "IbmX509" : "SunX509"); + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509"); keyManagerFactory.init(loadKeyStore(keystorePath), PASSWORD); for (KeyManager current : keyManagerFactory.getKeyManagers()) { @@ -394,7 +375,7 @@ private static X509ExtendedKeyManager getKeyManager(final String keystorePath) t * @throws KeyStoreException */ private static X509TrustManager getCATrustManager() throws Exception { - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(IS_IBM ? "IbmX509" : "SunX509"); + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509"); trustManagerFactory.init(loadKeyStore("/ca/jks/ca.truststore")); for (TrustManager current : trustManagerFactory.getTrustManagers()) { diff --git a/tests/base/src/test/java/org/wildfly/security/ssl/TLS13AuthenticationTest.java b/tests/base/src/test/java/org/wildfly/security/ssl/TLS13AuthenticationTest.java index 59e1c3d6559..814d2357202 100644 --- a/tests/base/src/test/java/org/wildfly/security/ssl/TLS13AuthenticationTest.java +++ b/tests/base/src/test/java/org/wildfly/security/ssl/TLS13AuthenticationTest.java @@ -70,7 +70,6 @@ */ public class TLS13AuthenticationTest { - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); private static final char[] PASSWORD = "Elytron".toCharArray(); private static final String CA_JKS_LOCATION = "./target/test-classes/jks"; @@ -238,7 +237,7 @@ private SecurityIdentity performConnectionTest(SSLContext serverContext, String * @return the initialised key manager. */ private static X509ExtendedKeyManager getKeyManager(final String keystorePath) throws Exception { - KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(IS_IBM ? "IbmX509" : "SunX509"); + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509"); keyManagerFactory.init(loadKeyStore(keystorePath), PASSWORD); for (KeyManager current : keyManagerFactory.getKeyManagers()) { @@ -257,7 +256,7 @@ private static X509ExtendedKeyManager getKeyManager(final String keystorePath) t * @throws KeyStoreException */ private static X509TrustManager getCATrustManager() throws Exception { - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(IS_IBM ? "IbmX509" : "SunX509"); + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509"); trustManagerFactory.init(loadKeyStore("/jks/ca.truststore")); for (TrustManager current : trustManagerFactory.getTrustManagers()) { diff --git a/tool/src/test/java/org/wildfly/security/tool/CredentialStoreCommandTest.java b/tool/src/test/java/org/wildfly/security/tool/CredentialStoreCommandTest.java index 5ddcc75a2d8..e4677eea3a5 100644 --- a/tool/src/test/java/org/wildfly/security/tool/CredentialStoreCommandTest.java +++ b/tool/src/test/java/org/wildfly/security/tool/CredentialStoreCommandTest.java @@ -52,7 +52,6 @@ * @author Hynek Švábek */ public class CredentialStoreCommandTest extends AbstractCommandTest { - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); public static final String RSA_ALGORITHM = "RSA"; public static final String DSA_ALGORITHM = "DSA"; public static final String EC_ALGORITHM = "EC"; @@ -357,7 +356,6 @@ public void testGenerateKeyPairDSA() throws CredentialStoreException { @Test public void testGenerateKeyPairECDSA() throws CredentialStoreException { - Assume.assumeFalse(IS_IBM); //Don't run if using IBM JDK https://issues.redhat.com/browse/ELY-2214 String storageLocation = getStoragePathForNewFile(); String storagePassword = "cspassword"; String aliasName = "testalias"; @@ -395,7 +393,6 @@ public void testExportPublicKey() { @Test public void testImportOpenSSHKeyPairFromFile() throws CredentialStoreException { - Assume.assumeFalse(IS_IBM); //Don't run if using IBM JDK https://issues.redhat.com/browse/ELY-2214 String storageLocation = getStoragePathForNewFile(); String storagePassword = "cspassword"; String aliasName = "testalias"; @@ -417,7 +414,6 @@ public void testImportOpenSSHKeyPairFromFile() throws CredentialStoreException { } @Test public void testImportPKCSKeyPairFromFile() throws CredentialStoreException { - Assume.assumeFalse(IS_IBM); //Don't run if using IBM JDK https://issues.redhat.com/browse/ELY-2214 String storageLocation = getStoragePathForNewFile(); String storagePassword = "cspassword"; String aliasName = "testalias"; @@ -442,7 +438,6 @@ public void testImportPKCSKeyPairFromFile() throws CredentialStoreException { @Test public void testImportOpenSSHKeyPairFromString() throws CredentialStoreException { - Assume.assumeFalse(IS_IBM); //Don't run if using IBM JDK https://issues.redhat.com/browse/ELY-2214 String storageLocation = getStoragePathForNewFile(); String storagePassword = "cspassword"; String aliasName = "testalias"; @@ -473,7 +468,6 @@ public void testImportOpenSSHKeyPairFromString() throws CredentialStoreException @Test public void testImportPKCSKeyPairFromString() throws CredentialStoreException { - Assume.assumeFalse(IS_IBM); //Don't run if using IBM JDK https://issues.redhat.com/browse/ELY-2214 String storageLocation = getStoragePathForNewFile(); String storagePassword = "cspassword"; String aliasName = "testalias"; diff --git a/tool/src/test/java/org/wildfly/security/tool/VaultCommandTest.java b/tool/src/test/java/org/wildfly/security/tool/VaultCommandTest.java index 23b781c76fe..e53cc183589 100644 --- a/tool/src/test/java/org/wildfly/security/tool/VaultCommandTest.java +++ b/tool/src/test/java/org/wildfly/security/tool/VaultCommandTest.java @@ -23,7 +23,6 @@ import java.io.File; import java.nio.file.Files; -import java.util.Arrays; import org.junit.BeforeClass; import org.junit.AfterClass; @@ -36,8 +35,6 @@ */ public class VaultCommandTest extends AbstractCommandTest { - private static final boolean IS_IBM = System.getProperty("java.vendor").contains("IBM"); - private static final String TARGET_LOCATION = "./target"; private static File workingDir = null; @@ -56,9 +53,7 @@ public class VaultCommandTest extends AbstractCommandTest { private static final String ALIAS = "test"; private static final String ENC_DIR = "target/test-classes/vault-v1/vault_data/"; - private static final String IBM_ENC_DIR = "target/test-classes/vault-v1/vault_data_ibm/"; private static final String KEYSTORE = "target/test-classes/vault-v1/vault-jceks.keystore"; - private static final String IBM_KEYSTORE = "target/test-classes/vault-v1/vault-jceks-ibm.keystore"; private static final String KEYSTORE_PASSWORD = "secretsecret"; private static final String SALT = "12345678"; private static final String ITERATION = "34"; @@ -385,22 +380,12 @@ public void singleConversionSummaryMaskedPasswordTest() throws Exception { */ @Test public void bulkConversionBasicTest() throws Exception { - String[] args; - if (IS_IBM) { - args = new String[]{"--bulk-convert", "target/test-classes/bulk-vault-conversion-desc-ibm"}; - } else { - args = new String[]{"--bulk-convert", "target/test-classes/bulk-vault-conversion-desc"}; - } + String[] args = new String[]{"--bulk-convert", "target/test-classes/bulk-vault-conversion-desc"}; // conversion String output = executeCommandAndCheckStatusAndGetOutput(args); String[] parts = output.split("converted to credential store"); Assert.assertTrue("Three credential stores has to be created", parts.length == 4); - if (IS_IBM) { - Assert.assertTrue("Check file names must pass", output.indexOf("vault-v1/vault-jceks-ibm.keystore") > 0 && output.indexOf("vault-v1-more/vault-jceks-ibm.keystore") > 0); - } else { - Assert.assertTrue("Check file names must pass", output.indexOf("vault-v1/vault-jceks.keystore") > 0 && output.indexOf("vault-v1-more/vault-jceks.keystore") > 0); - } - + Assert.assertTrue("Check file names must pass", output.indexOf("vault-v1/vault-jceks.keystore") > 0 && output.indexOf("vault-v1-more/vault-jceks.keystore") > 0); // check result args = new String[] { "--location", "target/v1-cs-more.store" , "--aliases", "--summary", @@ -446,9 +431,6 @@ public void testDuplicateOptions() { String[] args = new String[]{"--enc-dir", ENC_DIR, "--keystore", KEYSTORE, "--keystore-password", MASK, "--salt", SALT, "--iteration", "34", "--location", storeFileName, "--alias", ALIAS, "-e", "dir", "--keystore", "store"}; - if (IS_IBM) { - args = changeArgsToIBM(args); - } String output = executeCommandAndCheckStatusAndGetOutput(args); @@ -514,9 +496,6 @@ private void executeVaultCommandWithParams(String[] args, boolean shouldPass, St boolean passed = false; String output; - if (IS_IBM) { - args = changeArgsToIBM(args); - } try { output = executeCommandAndCheckStatusAndGetOutput(args); passed = true; @@ -535,16 +514,4 @@ private void executeVaultCommandWithParams(String[] args, boolean shouldPass, St Assert.assertTrue("Command output should contain \"" + expectedOutput + "\"", output.contains(expectedOutput)); } } - - private String[] changeArgsToIBM(String[] args) { - int index = Arrays.asList(args).indexOf(ENC_DIR); - if (index != -1) { - args[index] = IBM_ENC_DIR; - } - index = Arrays.asList(args).indexOf(KEYSTORE); - if (index != -1) { - args[index] = IBM_KEYSTORE; - } - return args; - } } \ No newline at end of file diff --git a/tool/src/test/resources/bulk-vault-conversion-desc-ibm b/tool/src/test/resources/bulk-vault-conversion-desc-ibm deleted file mode 100644 index 0bdaa47befc..00000000000 --- a/tool/src/test/resources/bulk-vault-conversion-desc-ibm +++ /dev/null @@ -1,23 +0,0 @@ -# Bulk conversion descriptor -keystore:target/test-classes/vault-v1/vault-jceks-ibm.keystore -keystore-password:MASK-2hKo56F1a3jYGnJwhPmiF5 -enc-dir:target/test-classes/vault-v1/vault_data_ibm/ -salt:12345678 -iteration:34 -location:target/v1-cs-1.store -alias:test - -keystore:target/test-classes/vault-v1/vault-jceks-ibm.keystore -keystore-password:secretsecret -enc-dir:target/test-classes/vault-v1/vault_data_ibm/ -location:target/v1-cs-2.store -alias:test - -# different vault vault-v1-more -keystore:target/test-classes/vault-v1-more/vault-jceks-ibm.keystore -keystore-password:MASK-2hKo56F1a3jYGnJwhPmiF5 -enc-dir:target/test-classes/vault-v1-more/vault_data_ibm/ -salt:12345678 -iteration:34 -location:target/v1-cs-more.store -alias:test diff --git a/tool/src/test/resources/vault-v1-more/vault-jceks-ibm.keystore b/tool/src/test/resources/vault-v1-more/vault-jceks-ibm.keystore deleted file mode 100644 index c03a29918424794ecd6d44d3e3af11f8e3c3f8e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 379 zcmX?i?%X*B1_mY|W&~np29}c4;u0Vyn|a{{p*3$ASc{7oB(oCB5-aqQiz*9B^7VpK z6LV5i{FAa$lS}N(Y?mG09#X)>z!J^Co0^xLpOTsqkXV$M3p9i&+9{er04NC3mzv_7 zpI4HaS5nAO$H3^rz*zuR<(QLR!XV@WvOqs4F)v*|xTGjEFWuUQfxQ@L4^SGUo~fds zvHS0Nq5M$L8@7R5(URZubO7)?=On` zxPI@EhsRnZ!gyR+T*NH?NktmI>Fvqu4N|ym7#nuzA>Stcjb77zZ$;f|J`h{H`1qcQ z+g8te`TbA2mQq-dK)_m&xnFZQ=cm1rS)e=7sV!>Nv%RarR&vdp{oFEJc1n+{+L<_k zFWR?vlrV?|IJt&rmSp(4m^$XAgcM~K