This is an automated email from the ASF dual-hosted git repository.
ngangam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 4a057a7cea1 HIVE-27952: Use SslContextFactory.Server() instead of
SslContextFactory (#4947)
4a057a7cea1 is described below
commit 4a057a7cea11029dbda7adaec09117d46e56d925
Author: seonggon <[email protected]>
AuthorDate: Tue Dec 19 02:30:09 2023 +0900
HIVE-27952: Use SslContextFactory.Server() instead of SslContextFactory
(#4947)
---
common/src/java/org/apache/hive/http/HttpServer.java | 2 +-
.../svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java | 2 +-
.../java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/src/java/org/apache/hive/http/HttpServer.java
b/common/src/java/org/apache/hive/http/HttpServer.java
index 2d73a920d47..83555fc5c73 100644
--- a/common/src/java/org/apache/hive/http/HttpServer.java
+++ b/common/src/java/org/apache/hive/http/HttpServer.java
@@ -536,7 +536,7 @@ public class HttpServer {
if (!b.useSSL) {
connector = new ServerConnector(webServer, http);
} else {
- SslContextFactory sslContextFactory = new SslContextFactory();
+ SslContextFactory sslContextFactory = new SslContextFactory.Server();
sslContextFactory.setKeyStorePath(b.keyStorePath);
sslContextFactory.setKeyStoreType(b.keyStoreType == null ||
b.keyStoreType.isEmpty() ?
KeyStore.getDefaultType(): b.keyStoreType);
diff --git
a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java
b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java
index 66fa5eb4ae8..04d99254e4e 100644
---
a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java
+++
b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java
@@ -286,7 +286,7 @@ public class Main {
if (conf.getBoolean(AppConfig.USE_SSL, false)) {
LOG.info("Using SSL for templeton.");
- SslContextFactory sslContextFactory = new SslContextFactory();
+ SslContextFactory sslContextFactory = new SslContextFactory.Server();
sslContextFactory.setKeyStorePath(conf.get(AppConfig.KEY_STORE_PATH,
DEFAULT_KEY_STORE_PATH));
sslContextFactory.setKeyStorePassword(conf.get(AppConfig.KEY_STORE_PASSWORD,
DEFAULT_KEY_STORE_PASSWORD));
Set<String> excludedSSLProtocols =
Sets.newHashSet(Splitter.on(",").trimResults().omitEmptyStrings()
diff --git
a/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
b/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
index bc20ea7797e..63d23c11d38 100644
---
a/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
+++
b/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
@@ -160,7 +160,7 @@ public class ThriftHttpCLIService extends ThriftCLIService {
if (keyStoreAlgorithm.isEmpty()) {
keyStoreAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
}
- SslContextFactory sslContextFactory = new SslContextFactory();
+ SslContextFactory sslContextFactory = new SslContextFactory.Server();
String[] excludedProtocols =
hiveConf.getVar(ConfVars.HIVE_SSL_PROTOCOL_BLACKLIST).split(",");
LOG.info("HTTP Server SSL: adding excluded protocols: " +
Arrays.toString(excludedProtocols));
sslContextFactory.addExcludeProtocols(excludedProtocols);