Class SslContextConverter
java.lang.Object
dev.resteasy.vertx.ssl.SslContextConverter
Bridges a
SSLContext to Vert.x SSL configuration.
Vert.x natively expects KeyCertOptions and TrustOptions
for SSL configuration and validates their presence before a server starts. This utility works around that
limitation by providing a custom SslContextFactory that wraps the given SSLContext into a
Netty JdkSslContext, which already contains all key and trust material.
- Since:
- 2.0
- Author:
- James R. Perkins
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidconfigureSsl(io.vertx.core.http.HttpClientOptions options, SSLContext sslContext) Configures SSL on the given client options using the providedSSLContext.static voidconfigureSsl(io.vertx.core.http.HttpServerOptions options, SSLContext sslContext, io.vertx.core.http.ClientAuth clientAuth) Configures SSL on the given server options using the providedSSLContext.
-
Method Details
-
configureSsl
public static void configureSsl(io.vertx.core.http.HttpServerOptions options, SSLContext sslContext, io.vertx.core.http.ClientAuth clientAuth) Configures SSL on the given server options using the providedSSLContext.- Parameters:
options- the HTTP server options to configuresslContext- the SSL context containing key and trust materialclientAuth- the client authentication mode
-
configureSsl
public static void configureSsl(io.vertx.core.http.HttpClientOptions options, SSLContext sslContext) Configures SSL on the given client options using the providedSSLContext.- Parameters:
options- the HTTP client options to configuresslContext- the SSL context containing key and trust material
-