From 98ae5d21bb92a56443bc788d7bc2664a58852135 Mon Sep 17 00:00:00 2001 From: Andrey Shitov Date: Fri, 12 Jan 2024 12:48:36 +0300 Subject: [PATCH] HIVE-27952 --- common/src/java/org/apache/hive/http/HttpServer.java | 2 +- .../apache/hive/service/cli/thrift/ThriftHttpCLIService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/java/org/apache/hive/http/HttpServer.java b/common/src/java/org/apache/hive/http/HttpServer.java index c274a8e293de..0b42e289fb74 100644 --- a/common/src/java/org/apache/hive/http/HttpServer.java +++ b/common/src/java/org/apache/hive/http/HttpServer.java @@ -454,7 +454,7 @@ Connector createChannelConnector(int queueSize, Builder b) { if (!b.useSSL) { connector = new ServerConnector(webServer, http); } else { - SslContextFactory sslContextFactory = new SslContextFactory(); + SslContextFactory sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setKeyStorePath(b.keyStorePath); Set excludedSSLProtocols = Sets.newHashSet( Splitter.on(",").trimResults().omitEmptyStrings().split( 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 a61b897871d1..9cb13bf0b7f6 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 @@ -116,7 +116,7 @@ protected void initServer() { ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH.varname + " Not configured for SSL connection"); } - 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);