private String[] getEnabledProtocols(final ZKConfig config, final SSLContext sslContext) { String enabledProtocolsInput = config.getProperty(x509Util.getSslEnabledProtocolsProperty()); if (enabledProtocolsInput == null) { return new String[] { sslContext.getProtocol() }; } return enabledProtocolsInput.split(","); }
/** * @param delegate Wrapped SSL context. * @param sslParameters Extended SSL parameters. */ public SSLContextWrapper(SSLContext delegate, SSLParameters sslParameters) { super(new DelegatingSSLContextSpi(delegate, sslParameters), delegate.getProvider(), delegate.getProtocol()); } }
/** * Construct a new instance. * * @param contextSpi the SSL context SPI to delegate to */ DelegatingSSLContext(final AbstractDelegatingSSLContextSpi contextSpi) { super(contextSpi, contextSpi.getDelegate().getProvider(), contextSpi.getDelegate().getProtocol()); } }
public SNISSLContext(SNIContextMatcher matcher) { super(new SNISSLContextSpi(matcher), matcher.getDefaultContext().getProvider(), matcher.getDefaultContext().getProtocol()); } }
public SNISSLContext(SNIContextMatcher matcher) { super(new SNISSLContextSpi(matcher), matcher.getDefaultContext().getProvider(), matcher.getDefaultContext().getProtocol()); } }
@Test(timeout = 5000) public void testCreateSSLContextWithoutCustomProtocol() throws Exception { SSLContext sslContext = x509Util.getDefaultSSLContext(); Assert.assertEquals(X509Util.DEFAULT_PROTOCOL, sslContext.getProtocol()); }
@Test(timeout = 5000) public void testCreateSSLContextWithCustomProtocol() throws Exception { final String protocol = "TLSv1.1"; System.setProperty(x509Util.getSslProtocolProperty(), protocol); SSLContext sslContext = x509Util.getDefaultSSLContext(); Assert.assertEquals(protocol, sslContext.getProtocol()); }
: SSLContext.getInstance(getProtocol()); context.addInfo("SSL protocol '" + sslContext.getProtocol() + "' provider '" + sslContext.getProvider() + "'");
.getSecureSocketProtocol() : ctx.getProtocol(); socketFactory = new SSLSocketFactoryWrapper(ctx.getSocketFactory(), cipherSuites, protocol);
@Test public void getSSLContextTestStringAsParameter() throws NoSuchAlgorithmException, NoSuchProviderException { Assert.assertEquals("TLSv1.2", spySSLUtils.getSSLContext("SunJSSE").getProtocol()); }
@Test public void getSSLContextTest() throws NoSuchAlgorithmException { Assert.assertEquals("TLSv1.2", spySSLUtils.getSSLContext().getProtocol()); }
/** */ SSLContextWrapper(SSLContext delegate, SSLParameters sslParameters) { super(new DelegatingSSLContextSpi(delegate, sslParameters), delegate.getProvider(), delegate.getProtocol()); } }
/** * Constructor. * * @param contextFactory * The parent SSL context factory. * @param wrappedContext * The wrapped SSL context. * */ public DefaultSslContext(DefaultSslContextFactory contextFactory, SSLContext wrappedContext) { super(createContextSpi(contextFactory, wrappedContext), wrappedContext .getProvider(), wrappedContext.getProtocol()); }
/** * Construct a new instance. * * @param contextSpi the SSL context SPI to delegate to */ DelegatingSSLContext(final AbstractDelegatingSSLContextSpi contextSpi) { super(contextSpi, contextSpi.getDelegate().getProvider(), contextSpi.getDelegate().getProtocol()); } }
/** * Construct a new instance. * * @param contextSpi the SSL context SPI to delegate to */ DelegatingSSLContext(final AbstractDelegatingSSLContextSpi contextSpi) { super(contextSpi, contextSpi.getDelegate().getProvider(), contextSpi.getDelegate().getProtocol()); } }
/** * Construct a new instance. * * @param contextSpi the SSL context SPI to delegate to */ DelegatingSSLContext(final AbstractDelegatingSSLContextSpi contextSpi) { super(contextSpi, contextSpi.getDelegate().getProvider(), contextSpi.getDelegate().getProtocol()); } }
public SNISSLContext(SNIContextMatcher matcher) { super(new SNISSLContextSpi(matcher), matcher.getDefaultContext().getProvider(), matcher.getDefaultContext().getProtocol()); } }
public SNISSLContext(SNIContextMatcher matcher) { super(new SNISSLContextSpi(matcher), matcher.getDefaultContext().getProvider(), matcher.getDefaultContext().getProtocol()); } }
public SNISSLContext(SNIContextMatcher matcher) { super(new SNISSLContextSpi(matcher), matcher.getDefaultContext().getProvider(), matcher.getDefaultContext().getProtocol()); } }
@Test public void testBuildAllNull_deprecated() throws Exception { final SSLContext sslContext = SSLContextBuilder.create() .setProtocol(null) .setSecureRandom(null) .loadTrustMaterial((KeyStore) null, null) .loadKeyMaterial((KeyStore) null, null, null) .build(); Assert.assertNotNull(sslContext); Assert.assertEquals("TLS", sslContext.getProtocol()); }