Search in sources :

Example 51 with SslContextBuilder

use of io.netty.handler.ssl.SslContextBuilder in project spring-boot-admin by codecentric.

the class QueryIndexEndpointStrategyTest method httpConnector.

private ReactorClientHttpConnector httpConnector() {
    SslContextBuilder sslCtx = SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE);
    HttpClient client = HttpClient.create().secure((ssl) -> ssl.sslContext(sslCtx));
    return new ReactorClientHttpConnector(client);
}
Also used : SslContextBuilder(io.netty.handler.ssl.SslContextBuilder) HttpClient(reactor.netty.http.client.HttpClient) ReactorClientHttpConnector(org.springframework.http.client.reactive.ReactorClientHttpConnector)

Aggregations

SslContextBuilder (io.netty.handler.ssl.SslContextBuilder)49 SslContext (io.netty.handler.ssl.SslContext)14 SSLException (javax.net.ssl.SSLException)12 KeyManagerFactory (javax.net.ssl.KeyManagerFactory)11 InputStream (java.io.InputStream)10 TrustManagerFactory (javax.net.ssl.TrustManagerFactory)10 SslProvider (io.netty.handler.ssl.SslProvider)9 File (java.io.File)9 IOException (java.io.IOException)9 KeyStore (java.security.KeyStore)7 X509Certificate (java.security.cert.X509Certificate)7 ApplicationProtocolConfig (io.netty.handler.ssl.ApplicationProtocolConfig)5 PrivateKey (java.security.PrivateKey)5 SslHandler (io.netty.handler.ssl.SslHandler)4 SelfSignedCertificate (io.netty.handler.ssl.util.SelfSignedCertificate)4 FileInputStream (java.io.FileInputStream)4 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)4 CertificateException (java.security.cert.CertificateException)4 NettyChannelBuilder (io.grpc.netty.NettyChannelBuilder)3 Bootstrap (io.netty.bootstrap.Bootstrap)3