public static SSLImplementation getInstance() throws ClassNotFoundException { for (String implementation : implementations) { try { return getInstance(implementation); } catch (Exception e) { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Error creating " + implementation, e); } } } // If we can't instantiate any of these throw new ClassNotFoundException("Can't find any SSL implementation"); }
private void logConfig(String description, SSLEngineConfigurator engConfig) { if (engConfig != null && getLogger().isLoggable(Level.CONFIG)) { StringBuffer buf = new StringBuffer(); buf.append(description).append(" SSLEngineConfigurator"); if (engConfig != null && engConfig instanceof SSLConfigurator) { SSLConfigurator sslConfigurator = (SSLConfigurator) engConfig; if (sslConfigurator.getSslImplementation() != null) { buf.append(" [ssl impl="). append(sslConfigurator.getSslImplementation().getImplementationName()).append("]"); } } buf.append(" [Enabled Protocols:"); String[] protocols = engConfig.getEnabledProtocols(); if (protocols != null) { for (String p : protocols) { buf.append(p).append(","); } buf.append("]"); } buf.append(" Provider=").append(engConfig.getSslContext().getProvider().getName()); getLogger().config(buf.toString()); } }
final ServerSocketFactory serverSF = getSslImplementation().getServerSocketFactory(); if (ssl != null) { if (ssl.getCrlFile() != null) {
private void logConfig(String description, SSLEngineConfigurator engConfig) { if (engConfig != null && getLogger().isLoggable(Level.CONFIG)) { StringBuffer buf = new StringBuffer(); buf.append(description).append(" SSLEngineConfigurator"); if (engConfig != null && engConfig instanceof SSLConfigurator) { SSLConfigurator sslConfigurator = (SSLConfigurator) engConfig; if (sslConfigurator.getSslImplementation() != null) { buf.append(" [ssl impl="). append(sslConfigurator.getSslImplementation().getImplementationName()).append("]"); } } buf.append(" [Enabled Protocols:"); String[] protocols = engConfig.getEnabledProtocols(); if (protocols != null) { for (String p : protocols) { buf.append(p).append(","); } buf.append("]"); } buf.append(" Provider=").append(engConfig.getSslContext().getProvider().getName()); getLogger().config(buf.toString()); } }
final ServerSocketFactory serverSF = getSslImplementation().getServerSocketFactory(); if (ssl != null) { if (ssl.getCrlFile() != null) {
public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if (className == null) { return getInstance(); } try { return (SSLImplementation) ((Class) Class.forName(className)).newInstance(); } catch (Exception e) { if (logger.isLoggable(Level.FINEST)) { logger.log(Level.FINEST, "Error loading SSL Implementation " + className, e); } throw new ClassNotFoundException("Error loading SSL Implementation " + className + " :" + e.toString()); } }
public static SSLImplementation getInstance() throws ClassNotFoundException { for (String implementation : implementations) { try { return getInstance(implementation); } catch (Exception e) { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Error creating " + implementation, e); } } } // If we can't instantiate any of these throw new ClassNotFoundException("Can't find any SSL implementation"); }
public static SSLImplementation getInstance(String className) throws ClassNotFoundException { if (className == null) { return getInstance(); } try { return (SSLImplementation) ((Class) Class.forName(className)).newInstance(); } catch (Exception e) { if (logger.isLoggable(Level.FINEST)) { logger.log(Level.FINEST, "Error loading SSL Implementation " + className, e); } throw new ClassNotFoundException("Error loading SSL Implementation " + className + " :" + e.toString()); } }
private static SSLImplementation lookupSSLImplementation( final ServiceLocator habitat, final Ssl ssl) { try { final String sslImplClassName = ssl.getClassname(); if (sslImplClassName != null) { final SSLImplementation impl = Utils.newInstance(habitat, SSLImplementation.class, sslImplClassName, sslImplClassName); if (impl != null) { return impl; } else { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.warning(LogMessages.WARNING_GRIZZLY_CONFIG_SSL_SSL_IMPLEMENTATION_LOAD_ERROR(sslImplClassName)); } return SSLImplementation.getInstance(); } } else { return SSLImplementation.getInstance(); } } catch (Exception e) { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_CONFIG_SSL_GENERAL_CONFIG_ERROR(), e); } } return null; }
private static SSLImplementation lookupSSLImplementation( final ServiceLocator habitat, final Ssl ssl) { try { final String sslImplClassName = ssl.getClassname(); if (sslImplClassName != null) { final SSLImplementation impl = Utils.newInstance(habitat, SSLImplementation.class, sslImplClassName, sslImplClassName); if (impl != null) { return impl; } else { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.warning(LogMessages.WARNING_GRIZZLY_CONFIG_SSL_SSL_IMPLEMENTATION_LOAD_ERROR(sslImplClassName)); } return SSLImplementation.getInstance(); } } else { return SSLImplementation.getInstance(); } } catch (Exception e) { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_CONFIG_SSL_GENERAL_CONFIG_ERROR(), e); } } return null; }