nodece commented on a change in pull request #13740:
URL: https://github.com/apache/pulsar/pull/13740#discussion_r820470961
##########
File path:
pulsar-common/src/test/java/org/apache/pulsar/common/util/jetty/JettySslContextFactoryWithKeyStoreTest.java
##########
@@ -16,9 +16,21 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.common.util.keystoretls;
+
+package org.apache.pulsar.common.util.jetty;
Review comment:
Fixed.
##########
File path:
pulsar-common/src/test/java/org/apache/pulsar/common/util/jetty/JettySslContextFactoryTest.java
##########
@@ -0,0 +1,174 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.pulsar.common.util.jetty;
+
+import com.google.common.io.Resources;
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLHandshakeException;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.pulsar.common.util.SecurityUtility;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.util.ssl.SslContextFactory;
+import org.testng.annotations.Test;
+
+@Slf4j
+public class JettySslContextFactoryTest {
Review comment:
Fixed.
##########
File path:
pulsar-common/src/main/java/org/apache/pulsar/common/util/keystoretls/KeyStoreSSLContext.java
##########
@@ -339,7 +340,10 @@ public static SSLContext createClientSslContext(String
keyStoreTypeString,
return keyStoreSSLContext.createSSLContext();
}
- // for web server. autoRefresh is default true.
+ /**
+ * for web server. autoRefresh is default true.
+ * @deprecated Use
JettySslContextFactory.createServerSslContextWithKeystore instead.
+ */
public static SslContextFactory.Server createSslContextFactory(String
sslProviderString,
String
keyStoreTypeString,
String
keyStore,
Review comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]