From b83e03abc2619c10590733c66ef345012c65de42 Mon Sep 17 00:00:00 2001 From: bitterfox Date: Sun, 22 May 2022 12:32:17 +0900 Subject: [PATCH] HBASE-27027 Use jetty SslContextFactory.Server instead of deprecated SslContextFactory (#4425) Signed-off-by: Duo Zhang (cherry picked from commit 1be2c83b3dc8306050f67828c9c2e361f19481c6) --- .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java | 2 +- .../src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java | 2 +- .../main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java index de2e59befb47..8b452be89e7c 100644 --- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java +++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java @@ -418,7 +418,7 @@ public HttpServer build() throws IOException { } else if ("https".equals(scheme)) { HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig); httpsConfig.addCustomizer(new SecureRequestCustomizer()); - SslContextFactory sslCtxFactory = new SslContextFactory(); + SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server(); sslCtxFactory.setNeedClientAuth(needsClientAuth); sslCtxFactory.setKeyManagerPassword(keyPassword); diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java index 02f8cb6a678c..acf1c669d338 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java @@ -314,7 +314,7 @@ public synchronized void run() throws Exception { HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig); httpsConfig.addCustomizer(new SecureRequestCustomizer()); - SslContextFactory sslCtxFactory = new SslContextFactory(); + SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server(); String keystore = conf.get(REST_SSL_KEYSTORE_STORE); String keystoreType = conf.get(REST_SSL_KEYSTORE_TYPE); String password = HBaseConfiguration.getPassword(conf, REST_SSL_KEYSTORE_PASSWORD, null); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java index ac978038eee9..33bd2ae869f2 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java @@ -408,7 +408,7 @@ protected void setupHTTPServer() throws IOException { HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig); httpsConfig.addCustomizer(new SecureRequestCustomizer()); - SslContextFactory sslCtxFactory = new SslContextFactory(); + SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server(); String keystore = conf.get(THRIFT_SSL_KEYSTORE_STORE_KEY); String password = HBaseConfiguration.getPassword(conf, THRIFT_SSL_KEYSTORE_PASSWORD_KEY, null);