Class JdkSslContextFactory

java.lang.Object
io.apicurio.registry.client.common.ssl.JdkSslContextFactory

public class JdkSslContextFactory extends Object
Factory class for creating JDK SSLContext and SSLParameters from RegistryClientOptions. Supports JKS, PKCS12, and PEM trust stores and client certificates for mTLS.
  • Method Details

    • hasSslConfig

      public static boolean hasSslConfig(RegistryClientOptions options)
      Determines if SSL/TLS configuration is required based on the options.
      Parameters:
      options - the client options
      Returns:
      true if SSL configuration is needed
    • createSslContext

      public static SSLContext createSslContext(RegistryClientOptions options)
      Creates an SSLContext configured with trust store and client certificate settings from the provided options.
      Parameters:
      options - the client options containing SSL/TLS configuration
      Returns:
      a configured SSLContext
      Throws:
      RuntimeException - if SSL configuration fails
    • createSslParameters

      public static SSLParameters createSslParameters(RegistryClientOptions options)
      Creates SSLParameters configured with hostname verification settings.
      Parameters:
      options - the client options
      Returns:
      configured SSLParameters