public static SSLImplementation getInstance() throws ClassNotFoundException { for(int i=0;i<implementations.length;i++){ try { SSLImplementation impl= getInstance(implementations[i]); return impl; } catch (Exception e) { if(logger.isTraceEnabled()) logger.trace("Error creating " + implementations[i],e); } } // If we can't instantiate any of these throw new ClassNotFoundException("Can't find any SSL implementation"); }
@Override public void init() throws Exception { // SSL implementation needs to be in place before end point is // initialized sslImplementation = SSLImplementation.getInstance(sslImplementationName); super.init(); } }
@Override public void init() throws Exception { // SSL implementation needs to be in place before end point is // initialized sslImplementation = SSLImplementation.getInstance(sslImplementationName); super.init(); } }
@Override public void init() throws Exception { // SSL implementation needs to be in place before end point is // initialized sslImplementation = SSLImplementation.getInstance(sslImplemenationName); super.init(); } }
@Override public void init() throws Exception { // SSL implementation needs to be in place before end point is // initialized sslImplementation = SSLImplementation.getInstance(sslImplementationName); super.init(); } }
public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if(className==null) return getInstance(); try { // Workaround for the J2SE 1.4.x classloading problem (under Solaris). // Class.forName(..) fails without creating class using new. // This is an ugly workaround. if( JSSEImplementationClass.equals(className) ) { return new org.apache.tomcat.util.net.jsse.JSSEImplementation(); } Class clazz=Class.forName(className); return (SSLImplementation)clazz.newInstance(); } catch (Exception e){ if(logger.isDebugEnabled()) logger.debug("Error loading SSL Implementation " +className, e); throw new ClassNotFoundException("Error loading SSL Implementation " +className+ " :" +e.toString()); } }
public static SSLImplementation getInstance() throws ClassNotFoundException { for (int i = 0; i < implementations.length; i++) { try { SSLImplementation impl = getInstance(implementations[i]); return impl; } catch (Exception e) { if (logger.isTraceEnabled()) logger.trace("Error creating " + implementations[i], e); } } // If we can't instantiate any of these throw new ClassNotFoundException("Can't find any SSL implementation"); }
public static SSLImplementation getInstance() throws ClassNotFoundException { for (int i = 0; i < implementations.length; i++) { try { SSLImplementation impl = getInstance(implementations[i]); return impl; } catch (Exception e) { if (logger.isTraceEnabled()) logger.trace("Error creating " + implementations[i], e); } } // If we can't instantiate any of these throw new ClassNotFoundException("Can't find any SSL implementation"); }
public static SSLImplementation getInstance() throws ClassNotFoundException { for (int i = 0; i < implementations.length; i++) { try { SSLImplementation impl = getInstance(implementations[i]); return impl; } catch (Exception e) { if (logger.isTraceEnabled()) logger.trace("Error creating " + implementations[i], e); } } // If we can't instantiate any of these throw new ClassNotFoundException("Can't find any SSL implementation"); }
public static SSLImplementation getInstance() throws ClassNotFoundException { for (int i = 0; i < implementations.length; i++) { try { SSLImplementation impl = getInstance(implementations[i]); return impl; } catch (Exception e) { if (logger.isTraceEnabled()) logger.trace("Error creating " + implementations[i], e); } } // If we can't instantiate any of these throw new ClassNotFoundException("Can't find any SSL implementation"); }
public static SSLImplementation getInstance() throws ClassNotFoundException { for(int i=0;i<implementations.length;i++){ try { SSLImplementation impl= getInstance(implementations[i]); return impl; } catch (Exception e) { if(logger.isTraceEnabled()) logger.trace("Error creating " + implementations[i],e); } } // If we can't instantiate any of these throw new ClassNotFoundException("Can't find any SSL implementation"); }
/** * Returns the {@code SSLImplementation} specified by the name of it's class * * @param className * @return a new instance of the {@code SSLImplementation} given by it's name * @throws ClassNotFoundException */ public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if (className == null) return getInstance(); try { Class<?> clazz = Class.forName(className); return (SSLImplementation) clazz.newInstance(); } catch (Exception e) { if (CoyoteLogger.UTIL_LOGGER.isDebugEnabled()) CoyoteLogger.UTIL_LOGGER.debug("Error loading SSL Implementation " + className, e); throw new ClassNotFoundException(MESSAGES.errorLoadingSslImplementation(className), e); } }
public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if(className==null) return getInstance(); try { // Workaround for the J2SE 1.4.x classloading problem (under Solaris). // Class.forName(..) fails without creating class using new. // This is an ugly workaround. if( JSSEImplementationClass.equals(className) ) { return new org.apache.tomcat.util.net.jsse.JSSEImplementation(); } Class clazz=Class.forName(className); return (SSLImplementation)clazz.newInstance(); } catch (Exception e){ if(logger.isDebugEnabled()) logger.debug("Error loading SSL Implementation " +className, e); throw new ClassNotFoundException("Error loading SSL Implementation " +className+ " :" +e.toString()); } }
public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if (className == null) return getInstance(); try { // Workaround for the J2SE 1.4.x classloading problem (under // Solaris). // Class.forName(..) fails without creating class using new. // This is an ugly workaround. if (JSSEImplementationClass.equals(className)) { return new org.apache.tomcat.util.net.jsse.JSSEImplementation(); } Class<?> clazz = Class.forName(className); return (SSLImplementation) clazz.newInstance(); } catch (Exception e) { if (logger.isDebugEnabled()) logger .debug("Error loading SSL Implementation " + className, e); throw new ClassNotFoundException( "Error loading SSL Implementation " + className + " :" + e.toString()); } }
public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if (className == null) return getInstance(); try { // Workaround for the J2SE 1.4.x classloading problem (under // Solaris). // Class.forName(..) fails without creating class using new. // This is an ugly workaround. if (JSSEImplementationClass.equals(className)) { return new org.apache.tomcat.util.net.jsse.JSSEImplementation(); } Class<?> clazz = Class.forName(className); return (SSLImplementation) clazz.newInstance(); } catch (Exception e) { if (logger.isDebugEnabled()) logger .debug("Error loading SSL Implementation " + className, e); throw new ClassNotFoundException( "Error loading SSL Implementation " + className + " :" + e.toString()); } }
public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if (className == null) return getInstance(); try { // Workaround for the J2SE 1.4.x classloading problem (under // Solaris). // Class.forName(..) fails without creating class using new. // This is an ugly workaround. if (JSSEImplementationClass.equals(className)) { return new org.apache.tomcat.util.net.jsse.JSSEImplementation(); } Class<?> clazz = Class.forName(className); return (SSLImplementation) clazz.newInstance(); } catch (Exception e) { if (logger.isDebugEnabled()) logger .debug("Error loading SSL Implementation " + className, e); throw new ClassNotFoundException( "Error loading SSL Implementation " + className + " :" + e.toString()); } }
public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if (className == null) return getInstance(); try { // Workaround for the J2SE 1.4.x classloading problem (under // Solaris). // Class.forName(..) fails without creating class using new. // This is an ugly workaround. if (JSSEImplementationClass.equals(className)) { return new org.apache.tomcat.util.net.jsse.JSSEImplementation(); } Class<?> clazz = Class.forName(className); return (SSLImplementation) clazz.newInstance(); } catch (Exception e) { if (logger.isDebugEnabled()) logger .debug("Error loading SSL Implementation " + className, e); throw new ClassNotFoundException( "Error loading SSL Implementation " + className + " :" + e.toString()); } }
/** * @return the default implementation of {@code SSLImplementation} * @throws ClassNotFoundException */ public static SSLImplementation getInstance() throws ClassNotFoundException { for (int i = 0; i < implementations.length; i++) { try { SSLImplementation impl = getInstance(implementations[i]); return impl; } catch (Exception e) { if (CoyoteLogger.UTIL_LOGGER.isTraceEnabled()) CoyoteLogger.UTIL_LOGGER.trace("Error creating " + implementations[i], e); } } // If we can't instantiate any of these throw new ClassNotFoundException(MESSAGES.noSslImplementation()); }
@Override public boolean isAlpnSupported() { // ALPN requires TLS so if TLS is not enabled, ALPN cannot be supported if (!isSSLEnabled()) { return false; } // Depends on the SSLImplementation. SSLImplementation sslImplementation; try { sslImplementation = SSLImplementation.getInstance(getSslImplementationName()); } catch (ClassNotFoundException e) { // Ignore the exception. It will be logged when trying to start the // end point. return false; } return sslImplementation.isAlpnSupported(); }
protected void initialiseSsl() throws Exception { if (isSSLEnabled()) { sslImplementation = SSLImplementation.getInstance(getSslImplementationName()); for (SSLHostConfig sslHostConfig : sslHostConfigs.values()) { sslHostConfig.setConfigType(getSslConfigType()); createSSLContext(sslHostConfig); } // Validate default SSLHostConfigName if (sslHostConfigs.get(getDefaultSSLHostConfigName()) == null) { throw new IllegalArgumentException(sm.getString("endpoint.noSslHostConfig", getDefaultSSLHostConfigName(), getName())); } } }