Class SslConfig
-
- All Implemented Interfaces:
public final class SslConfigData class to hold the configuration for the plugin.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumSslConfig.LoadedIdentitypublic final classSslConfig.PrivateConfigInternal data class to hold the identity configuration. DO NOT USE DIRECTLY.
-
Field Summary
Fields Modifier and Type Field Description public Stringhostpublic Booleaninsecurepublic Booleansecurepublic IntegersecurePortpublic IntegerinsecurePortpublic Booleanredirectpublic Booleanhttp2public BooleansniHostCheckpublic TlsConfigtlsConfigprivate final SslConfig.PrivateConfigpvtprivate final Consumer<ServerConnector>configConnectorspublic ProvidersecurityProviderprivate final TrustConfigtrustConfig
-
Constructor Summary
Constructors Constructor Description SslConfig()
-
Method Summary
Modifier and Type Method Description final SslConfig.PrivateConfiggetPvt()Internal configuration holder for the identity. final Consumer<ServerConnector>getConfigConnectors()final TrustConfiggetTrustConfig()Trust store configuration for the server, if not set, every client will be accepted. final UnitpemFromPath(String certificatePath, String privateKeyPath, String password)Load pem formatted identity data from a given path in the system. final UnitpemFromPath(String certificatePath, String privateKeyPath)Load pem formatted identity data from a given path in the system. final UnitpemFromClasspath(String certificateFile, String privateKeyFile, String password)Load pem formatted identity data from the classpath. final UnitpemFromClasspath(String certificateFile, String privateKeyFile)Load pem formatted identity data from the classpath. final UnitpemFromInputStream(InputStream certificateInputStream, InputStream privateKeyInputStream, String password)Load pem formatted identity data from a given input stream. final UnitpemFromInputStream(InputStream certificateInputStream, InputStream privateKeyInputStream)Load pem formatted identity data from a given input stream. final UnitpemFromString(String certificateString, String privateKeyString, String password)Load pem formatted identity data from a given string. final UnitpemFromString(String certificateString, String privateKeyString)Load pem formatted identity data from a given string. final UnitkeystoreFromPath(String keyStorePath, String keyStorePassword, String identityPassword)Load a key store from a given path in the system. final UnitkeystoreFromPath(String keyStorePath, String keyStorePassword)Load a key store from a given path in the system. final UnitkeystoreFromInputStream(InputStream keyStoreInputStream, String keyStorePassword, String identityPassword)Load a key store from a given input stream. final UnitkeystoreFromInputStream(InputStream keyStoreInputStream, String keyStorePassword)Load a key store from a given input stream. final UnitkeystoreFromClasspath(String keyStoreFile, String keyStorePassword, String identityPassword)Load a key store from the classpath. final UnitkeystoreFromClasspath(String keyStoreFile, String keyStorePassword)Load a key store from the classpath. final UnitconfigConnectors(Consumer<ServerConnector> configConnectors)Consumer to configure the different ServerConnector that will be created. final UnitwithTrustConfig(Consumer<TrustConfig> trustConfigConsumer)Configure the trust configuration for the server. -
-
Method Detail
-
getPvt
final SslConfig.PrivateConfig getPvt()
Internal configuration holder for the identity. DO NOT USE DIRECTLY.
-
getConfigConnectors
final Consumer<ServerConnector> getConfigConnectors()
-
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 storeidentityPassword- 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.
-
-
-
-