HADOOP-10432. Refactor SSLFactory to expose static method to determine HostnameVerifier. (tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1586098 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5c18d45224
commit
9a2ec694fe
@ -127,6 +127,9 @@ Trunk (Unreleased)
|
||||
HADOOP-10237. JavaKeyStoreProvider needs to set keystore permissions
|
||||
correctly. (Larry McCay via omalley)
|
||||
|
||||
HADOOP-10432. Refactor SSLFactory to expose static method to determine
|
||||
HostnameVerifier. (tucu)
|
||||
|
||||
BUG FIXES
|
||||
|
||||
HADOOP-9451. Fault single-layer config if node group topology is enabled.
|
||||
|
@ -127,10 +127,14 @@ public void init() throws GeneralSecurityException, IOException {
|
||||
}
|
||||
|
||||
private HostnameVerifier getHostnameVerifier(Configuration conf)
|
||||
throws GeneralSecurityException, IOException {
|
||||
return getHostnameVerifier(conf.get(SSL_HOSTNAME_VERIFIER_KEY, "DEFAULT").
|
||||
trim().toUpperCase());
|
||||
}
|
||||
|
||||
public static HostnameVerifier getHostnameVerifier(String verifier)
|
||||
throws GeneralSecurityException, IOException {
|
||||
HostnameVerifier hostnameVerifier;
|
||||
String verifier =
|
||||
conf.get(SSL_HOSTNAME_VERIFIER_KEY, "DEFAULT").trim().toUpperCase();
|
||||
if (verifier.equals("DEFAULT")) {
|
||||
hostnameVerifier = SSLHostnameVerifier.DEFAULT;
|
||||
} else if (verifier.equals("DEFAULT_AND_LOCALHOST")) {
|
||||
|
Loading…
Reference in New Issue
Block a user