Class SSLConfig

java.lang.Object
io.javalin.community.ssl.SSLConfig

public class SSLConfig extends Object
  • Field Details

    • host

      public String host
      Host to bind to.
    • insecure

      public boolean insecure
      Toggle the default http (insecure) connector.
    • secure

      public boolean secure
      Toggle the default https (secure) connector.
    • securePort

      public int securePort
      Port to use on the SSL (secure) connector.
    • insecurePort

      public int insecurePort
      Port to use on the http (insecure) connector.
    • http2

      public boolean http2
      Toggle HTTP/2 Support
    • sniHostCheck

      public boolean sniHostCheck
      Disable SNI checks.
      See Also:
    • tlsConfig

      public TLSConfig tlsConfig
      TLS Security configuration
    • enableHttp3

      public final boolean enableHttp3
      Enables HTTP/3 Support. Disabled by default because it is not yet working on Jetty.
      See Also:
    • disableHttp3Upgrade

      public final boolean disableHttp3Upgrade
      Disables the handler that adds an "Alt-Svc" header to any non HTTP/3 response. Disabled by default because it is not yet working on Jetty.
      See Also:
    • http3Port

      public final int http3Port
      UDP Port to use on the HTTP/3 connector. Disabled by default because it is not yet working on Jetty.
      See Also:
    • inner

      public SSLConfig.InnerConfig inner
  • Constructor Details

    • SSLConfig

      public SSLConfig()
  • Method Details

    • pemFromPath

      public void pemFromPath(String certificatePath, String privateKeyPath)
      Load pem formatted identity data from a given path in the system.
      Parameters:
      certificatePath - path to the certificate chain PEM file.
      privateKeyPath - path to the private key PEM file.
    • pemFromPath

      public void pemFromPath(String certificatePath, String privateKeyPath, String privateKeyPassword)
      Load pem formatted identity data from a given path in the system.
      Parameters:
      certificatePath - path to the certificate chain PEM file.
      privateKeyPath - path to the private key PEM file.
      privateKeyPassword - password for the private key.
    • pemFromClasspath

      public void pemFromClasspath(String certificateFile, String privateKeyFile)
      Load pem formatted identity data from the classpath.
      Parameters:
      certificateFile - The name of the pem certificate file in the classpath.
      privateKeyFile - The name of the pem private key file in the classpath.
    • pemFromClasspath

      public void pemFromClasspath(String certificateFile, String privateKeyFile, String privateKeyPassword)
      Load pem formatted identity data from the classpath.
      Parameters:
      certificateFile - The name of the pem certificate file in the classpath.
      privateKeyFile - The name of the pem private key file in the classpath.
      privateKeyPassword - password for the private key.
    • pemFromInputStream

      public void pemFromInputStream(InputStream certificateInputStream, InputStream privateKeyInputStream)
      Load pem formatted identity data from a given input stream.
      Parameters:
      certificateInputStream - input stream to the certificate chain PEM file.
      privateKeyInputStream - input stream to the private key PEM file.
    • pemFromInputStream

      public void pemFromInputStream(InputStream certificateInputStream, InputStream privateKeyInputStream, String privateKeyPassword)
      Load pem formatted identity data from a given input stream.
      Parameters:
      certificateInputStream - input stream to the certificate chain PEM file.
      privateKeyInputStream - input stream to the private key PEM file.
      privateKeyPassword - password for the private key.
    • pemFromString

      public void pemFromString(String certificateString, String privateKeyString)
      Load pem formatted identity data from a given string.
      Parameters:
      certificateString - PEM encoded certificate chain.
      privateKeyString - PEM encoded private key.
    • pemFromString

      public void pemFromString(String certificateString, String privateKeyString, String privateKeyPassword)
      Load pem formatted identity data from a given string.
      Parameters:
      certificateString - PEM encoded certificate chain.
      privateKeyString - PEM encoded private key.
      privateKeyPassword - password for the private key.
    • keystoreFromPath

      public void keystoreFromPath(String keyStorePath, String keyStorePassword)
      Load a key store from a given path in the system.
      Parameters:
      keyStorePath - path to the key store file.
      keyStorePassword - password for the key store.
    • keystoreFromInputStream

      public void keystoreFromInputStream(InputStream keyStoreInputStream, String keyStorePassword)
      Load a key store from a given input stream.
      Parameters:
      keyStoreInputStream - input stream to the key store file.
      keyStorePassword - password for the key store.
    • keystoreFromClasspath

      public void keystoreFromClasspath(String keyStoreFile, String keyStorePassword)
      Load a key store from the classpath.
      Parameters:
      keyStoreFile - name of the key store file in the classpath.
      keyStorePassword - password for the key store.