Class SslConfig

  • All Implemented Interfaces:

    
    public final class SslConfig
    
                        

    Data class to hold the configuration for the plugin.

    • Constructor Detail

      • SslConfig

        SslConfig()
    • Method Detail

      • getTrustConfig

         final TrustConfig getTrustConfig()

        Trust store configuration for the server, if not set, every client will be accepted.

      • pemFromPath

        @JvmOverloads() final Unit pemFromPath(String certificatePath, String privateKeyPath, String password)

        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.
        password - optional password for the private key.
      • pemFromPath

        @JvmOverloads() final Unit 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.
      • pemFromClasspath

        @JvmOverloads() final Unit pemFromClasspath(String certificateFile, String privateKeyFile, String password)

        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.
        password - optional password for the private key.
      • pemFromClasspath

        @JvmOverloads() final Unit 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.
      • pemFromInputStream

        @JvmOverloads() final Unit pemFromInputStream(InputStream certificateInputStream, InputStream privateKeyInputStream, String password)

        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.
        password - optional password for the private key.
      • pemFromInputStream

        @JvmOverloads() final Unit 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.
      • pemFromString

        @JvmOverloads() final Unit pemFromString(String certificateString, String privateKeyString, String password)

        Load pem formatted identity data from a given string.

        Parameters:
        certificateString - PEM encoded certificate chain.
        privateKeyString - PEM encoded private key.
        password - optional password for the private key.
      • pemFromString

        @JvmOverloads() final Unit 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.
      • keystoreFromPath

        @JvmOverloads() final Unit keystoreFromPath(String keyStorePath, String keyStorePassword, String identityPassword)

        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.
        identityPassword - password for the identity, if different from the key store password.
      • keystoreFromPath

        @JvmOverloads() final Unit 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

        @JvmOverloads() final Unit keystoreFromInputStream(InputStream keyStoreInputStream, String keyStorePassword, String identityPassword)

        Load a key store from a given input stream.

        Parameters:
        keyStoreInputStream - input stream to the key store file.
        keyStorePassword - password for the key store
        identityPassword - password for the identity, if different from the key store password.
      • keystoreFromInputStream

        @JvmOverloads() final Unit 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

        @JvmOverloads() final Unit keystoreFromClasspath(String keyStoreFile, String keyStorePassword, String identityPassword)

        Load a key store from the classpath.

        Parameters:
        keyStoreFile - name of the key store file in the classpath.
        keyStorePassword - password for the key store.
        identityPassword - password for the identity, if different from the key store password.
      • keystoreFromClasspath

        @JvmOverloads() final Unit 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.
      • configConnectors

         final Unit configConnectors(Consumer<ServerConnector> configConnectors)

        Consumer to configure the different ServerConnector that will be created. This consumer will be called as the last config step for each connector, allowing to override any previous configuration.

      • withTrustConfig

         final Unit withTrustConfig(Consumer<TrustConfig> trustConfigConsumer)

        Configure the trust configuration for the server.

        Parameters:
        trustConfigConsumer - consumer to configure the trust configuration.