Class SslContextConverter

java.lang.Object
dev.resteasy.vertx.ssl.SslContextConverter

public final class SslContextConverter extends Object
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 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 provided SSLContext.
      Parameters:
      options - the HTTP server options to configure
      sslContext - the SSL context containing key and trust material
      clientAuth - 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 provided SSLContext.
      Parameters:
      options - the HTTP client options to configure
      sslContext - the SSL context containing key and trust material