diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index 12acf338a1b..27876c92eae 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -1008,7 +1008,7 @@ protected void initInternal() throws LifecycleException { AbstractHttp11JsseProtocol jsseProtocolHandler = (AbstractHttp11JsseProtocol) protocolHandler; if (jsseProtocolHandler.getSslImplementationName() == null) { // OpenSSL is compatible with the JSSE configuration, so use it if APR is available - jsseProtocolHandler.setSslImplementationName(OpenSSLImplementation.IMPLEMENTATION_NAME); + jsseProtocolHandler.setSslImplementationName(OpenSSLImplementation.class.getName()); } } diff --git a/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java b/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java index 19df572e758..3646bcfd9b8 100644 --- a/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java +++ b/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java @@ -64,7 +64,7 @@ public void setSniParseLimit(int sniParseLimit) { @Override protected Type getSslConfigType() { - if (OpenSSLImplementation.IMPLEMENTATION_NAME.equals(sslImplementationName)) { + if (OpenSSLImplementation.class.getName().equals(sslImplementationName)) { return SSLHostConfig.Type.EITHER; } else { return SSLHostConfig.Type.JSSE; diff --git a/java/org/apache/tomcat/util/net/SSLImplementation.java b/java/org/apache/tomcat/util/net/SSLImplementation.java index 1c45d58c0ff..75b4709fac0 100644 --- a/java/org/apache/tomcat/util/net/SSLImplementation.java +++ b/java/org/apache/tomcat/util/net/SSLImplementation.java @@ -34,23 +34,12 @@ public abstract class SSLImplementation { private static final Log logger = LogFactory.getLog(SSLImplementation.class); private static final StringManager sm = StringManager.getManager(SSLImplementation.class); - /** - * Obtain an instance (not a singleton) of the default implementation. - * Currently, this is the standard JSSE implementation that ships as part of - * the JRE. Tomcat also provides an OpenSSL based implementation. - * - * @return The default implementation - */ - public static SSLImplementation getInstance() { - return new JSSEImplementation(); - } - - /** * Obtain an instance (not a singleton) of the implementation with the given * class name. * - * @param className The class name of the required implementation + * @param className The class name of the required implementation or null to + * use the default (currently {@link JSSEImplementation}. * * @return An instance of the required implementation * @@ -60,7 +49,7 @@ public static SSLImplementation getInstance() { public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if (className == null) - return getInstance(); + return new JSSEImplementation(); try { Class clazz = Class.forName(className); @@ -75,8 +64,6 @@ public static SSLImplementation getInstance(String className) } - public abstract String getImplementationName(); - public abstract SSLSupport getSSLSupport(SSLSession session); public abstract SSLUtil getSSLUtil(SSLHostConfig sslHostConfig, diff --git a/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java b/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java index 0d6d152c3f3..12ed6d15df8 100644 --- a/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java +++ b/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java @@ -40,11 +40,6 @@ public JSSEImplementation() { JSSESupport.init(); } - @Override - public String getImplementationName(){ - return "JSSE"; - } - @Override public SSLSupport getSSLSupport(SSLSession session) { return new JSSESupport(session); diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLImplementation.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLImplementation.java index d1472019b1b..105da218c79 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLImplementation.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLImplementation.java @@ -27,13 +27,6 @@ public class OpenSSLImplementation extends SSLImplementation { - public static final String IMPLEMENTATION_NAME = "org.apache.tomcat.util.net.openssl.OpenSSLImplementation"; - - @Override - public String getImplementationName() { - return "OpenSSl"; - } - @Override public SSLSupport getSSLSupport(SSLSession session) { return new JSSESupport(session);