HADOOP-9430. TestSSLFactory fails on IBM JVM. Contributed by Amir Sanjar.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1461268 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
66e90b205a
commit
af7b7667f5
@ -592,6 +592,8 @@ Release 2.0.5-beta - UNRELEASED
|
||||
HADOOP-9299. kerberos name resolution is kicking in even when kerberos
|
||||
is not configured (daryn)
|
||||
|
||||
HADOOP-9430. TestSSLFactory fails on IBM JVM. (Amir Sanjar via suresh)
|
||||
|
||||
Release 2.0.4-alpha - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -164,7 +164,9 @@ public void init(SSLFactory.Mode mode)
|
||||
} else {
|
||||
keystore.load(null, null);
|
||||
}
|
||||
KeyManagerFactory keyMgrFactory = KeyManagerFactory.getInstance("SunX509");
|
||||
KeyManagerFactory keyMgrFactory = KeyManagerFactory
|
||||
.getInstance(SSLFactory.SSLCERTIFICATE);
|
||||
|
||||
keyMgrFactory.init(keystore, (keystorePassword != null) ?
|
||||
keystorePassword.toCharArray() : null);
|
||||
keyManagers = keyMgrFactory.getKeyManagers();
|
||||
|
@ -170,7 +170,7 @@ X509TrustManager loadTrustManager()
|
||||
}
|
||||
|
||||
TrustManagerFactory trustManagerFactory =
|
||||
TrustManagerFactory.getInstance("SunX509");
|
||||
TrustManagerFactory.getInstance(SSLFactory.SSLCERTIFICATE);
|
||||
trustManagerFactory.init(ks);
|
||||
TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
|
||||
for (TrustManager trustManager1 : trustManagers) {
|
||||
|
@ -58,6 +58,9 @@ public static enum Mode { CLIENT, SERVER }
|
||||
"hadoop.ssl.client.conf";
|
||||
public static final String SSL_SERVER_CONF_KEY =
|
||||
"hadoop.ssl.server.conf";
|
||||
private static final boolean IBMJAVA =
|
||||
System.getProperty("java.vendor").contains("IBM");
|
||||
public static final String SSLCERTIFICATE = IBMJAVA?"ibmX509":"SunX509";
|
||||
|
||||
public static final boolean DEFAULT_SSL_REQUIRE_CLIENT_CERT = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user