List of usage examples for io.netty.handler.ssl OpenSsl supportsHostnameValidation
@Deprecated public static boolean supportsHostnameValidation()
From source file:org.apache.qpid.jms.transports.TransportSupportTest.java
License:Apache License
@Test public void testCreateSslEngineWithVerifyHostOpenSSL() throws Exception { assumeTrue(OpenSsl.isAvailable());//from www .ja v a 2 s . c o m assumeTrue(OpenSsl.supportsKeyManagerFactory()); assumeTrue(OpenSsl.supportsHostnameValidation()); TransportOptions options = createJksSslOptions(); options.setVerifyHost(true); SslContext context = TransportSupport.createOpenSslContext(options); assertNotNull(context); SSLEngine engine = TransportSupport.createOpenSslEngine(PooledByteBufAllocator.DEFAULT, null, context, options); assertNotNull(engine); assertEquals("HTTPS", engine.getSSLParameters().getEndpointIdentificationAlgorithm()); }
From source file:org.apache.qpid.jms.transports.TransportSupportTest.java
License:Apache License
@Test public void testCreateSslEngineWithoutVerifyHostOpenSSL() throws Exception { assumeTrue(OpenSsl.isAvailable());//from ww w . j a va 2 s . com assumeTrue(OpenSsl.supportsKeyManagerFactory()); assumeTrue(OpenSsl.supportsHostnameValidation()); TransportOptions options = createJksSslOptions(); options.setVerifyHost(false); SslContext context = TransportSupport.createOpenSslContext(options); assertNotNull(context); SSLEngine engine = TransportSupport.createOpenSslEngine(PooledByteBufAllocator.DEFAULT, null, context, options); assertNotNull(engine); assertNull(engine.getSSLParameters().getEndpointIdentificationAlgorithm()); }
From source file:org.apache.qpid.jms.transports.TransportSupportTest.java
License:Apache License
@Test(timeout = 100000) public void testIsOpenSSLPossibleWhenHostNameVerificationConfigured() throws Exception { assumeTrue(OpenSsl.isAvailable());//from w w w. j av a 2 s. c o m assumeTrue(OpenSsl.supportsKeyManagerFactory()); assumeTrue(OpenSsl.supportsHostnameValidation()); TransportOptions options = new TransportOptions(); options.setUseOpenSSL(true); options.setVerifyHost(false); assertTrue(TransportSupport.isOpenSSLPossible(options)); options.setVerifyHost(true); assertTrue(TransportSupport.isOpenSSLPossible(options)); }
From source file:org.apache.qpid.jms.transports.TransportSupportTest.java
License:Apache License
@Test(timeout = 100000) public void testIsOpenSSLPossibleWhenKeyAliasIsSpecified() throws Exception { assumeTrue(OpenSsl.isAvailable());/*from w ww . j av a 2 s . c om*/ assumeTrue(OpenSsl.supportsKeyManagerFactory()); assumeTrue(OpenSsl.supportsHostnameValidation()); TransportOptions options = new TransportOptions(); options.setUseOpenSSL(true); options.setKeyAlias("alias"); assertFalse(TransportSupport.isOpenSSLPossible(options)); }