/** * Creates the underlying SSLContext using truststore and keystore attributes and makes this factory ready for use. * Must be called before factory can be used. * * @throws GeneralSecurityException if the SSLContext cannot be created */ @Override public void initialize() throws GeneralSecurityException { final SSLContextInitializer contextInitializer = createSSLContextInitializer(); logger.trace("Using SSLContextInitializer={}", contextInitializer); final SSLContext ctx = contextInitializer.initSSLContext(DEFAULT_PROTOCOL); factory = ctx.getSocketFactory(); }
/** * Creates the underlying SSLContext using truststore and keystore attributes and makes this factory ready for use. * Must be called before factory can be used. * * @throws GeneralSecurityException if the SSLContext cannot be created */ @Override public void initialize() throws GeneralSecurityException { final SSLContextInitializer contextInitializer = createSSLContextInitializer(); logger.trace("Using SSLContextInitializer={}", contextInitializer); final SSLContext ctx = contextInitializer.initSSLContext(DEFAULT_PROTOCOL); factory = ctx.getSocketFactory(); }
final SSLContext ctx = contextInitializer.initSSLContext(DEFAULT_PROTOCOL); factory = ctx.getSocketFactory();