SslContextBuilder

cc.otavia.handler.ssl.SslContextBuilder
See theSslContextBuilder companion object

Builder for configuring a new SslContext for creation.

Value parameters

forServer

is server-side SslContext

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Application protocol negotiation configuration. null disables support.

Application protocol negotiation configuration. null disables support.

Attributes

def build(): SslContext

Create new SslContext instance with configured settings.

Create new SslContext instance with configured settings.

Attributes

def ciphers(ciphers: Seq[String], cipherFilter: CipherSuiteFilter): this.type

The cipher suites to enable, in the order of preference. cipherFilter will be applied to the ciphers before use. If ciphers is not setting, then the default cipher suites will be used.

The cipher suites to enable, in the order of preference. cipherFilter will be applied to the ciphers before use. If ciphers is not setting, then the default cipher suites will be used.

Attributes

def clientAuth(clientAuth: ClientAuth): this.type

Sets the client authentication mode.

Sets the client authentication mode.

Attributes

def keyManager(keyCertChainFile: File, keyFile: File, keyPassword: Option[String]): this.type

Identifying certificate for this host. keyCertChainFile and keyFile may be null for client contexts, which disables mutual authentication.

Identifying certificate for this host. keyCertChainFile and keyFile may be null for client contexts, which disables mutual authentication.

Value parameters

keyCertChainFile

an X.509 certificate chain file in PEM format

keyFile

a PKCS#8 private key file in PEM format

keyPassword

the password of the keyFile, or null if it's not password-protected

Attributes

def keyManager(keyCertChainInputStream: InputStream, keyInputStream: InputStream, keyPassword: Option[String]): this.type

Identifying certificate for this host. keyCertChainInputStream and keyInputStream may be null for client contexts, which disables mutual authentication.

Identifying certificate for this host. keyCertChainInputStream and keyInputStream may be null for client contexts, which disables mutual authentication.

Value parameters

keyCertChainInputStream

an input stream for an X.509 certificate chain in PEM format. The caller is responsible for calling InputStream.close() after build() has been called.

keyInputStream

an input stream for a PKCS#8 private key in PEM format. The caller is responsible for calling InputStream.close() after build() has been called.

keyPassword

the password of the keyInputStream, or null if it's not password-protected

Attributes

def keyManager(key: PrivateKey, keyPassword: Option[String], keyCertChain: X509Certificate*): this.type

Identifying certificate for this host. keyCertChain and key may be null for client contexts, which disables mutual authentication.

Identifying certificate for this host. keyCertChain and key may be null for client contexts, which disables mutual authentication.

Value parameters

key

a PKCS#8 private key file

keyCertChain

an X.509 certificate chain

keyPassword

the password of the key, or null if it's not password-protected

Attributes

def keyManager(keyManagerFactory: KeyManagerFactory): this.type

Identifying manager for this host. keyManagerFactory may be null for client contexts, which disables mutual authentication. Using a KeyManagerFactory is only supported for SslProvider.JDK.

Identifying manager for this host. keyManagerFactory may be null for client contexts, which disables mutual authentication. Using a KeyManagerFactory is only supported for SslProvider.JDK.

Attributes

def keyStoreType(keyStoreType: String): this.type

Sets the KeyStore type that should be used. if not set to uses the default one.

Sets the KeyStore type that should be used. if not set to uses the default one.

Attributes

def protocols(protocols: String*): this.type

The TLS protocol versions to enable.

The TLS protocol versions to enable.

Value parameters

protocols

The protocols to enable, or null to enable the default protocols.

Attributes

def sessionCacheSize(sessionCacheSize: Long): this.type

Set the size of the cache used for storing SSL session objects. 0 to use the default value.

Set the size of the cache used for storing SSL session objects. 0 to use the default value.

Attributes

def sessionTimeout(sessionTimeout: Long): this.type

Set the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Set the timeout for the cached SSL session objects, in seconds. 0 to use the default value.

Attributes

def sslContextProvider(sslContextProvider: Provider): this.type

The SSLContext Provider to use. if not set to uses the default one. This is only used with SslProvider.JDK.

The SSLContext Provider to use. if not set to uses the default one. This is only used with SslProvider.JDK.

Attributes

def sslProvider(provider: SslProvider): this.type

The SslContext implementation to use. if not set to uses the default one.

The SslContext implementation to use. if not set to uses the default one.

Attributes

def startTls(startTls: Boolean): this.type

true if the first write request shouldn't be encrypted.

true if the first write request shouldn't be encrypted.

Attributes

def trustManager(trustCertCollectionFile: File): this.type

Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate collection in PEM format. null uses the system default.

Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate collection in PEM format. null uses the system default.

Attributes

def trustManager(trustCertCollectionInputStream: InputStream): this.type

Trusted certificates for verifying the remote endpoint's certificate. The input stream should contain an X.509 certificate collection in PEM format. null uses the system default. The caller is responsible for calling InputStream.close() after build() has been called.

Trusted certificates for verifying the remote endpoint's certificate. The input stream should contain an X.509 certificate collection in PEM format. null uses the system default. The caller is responsible for calling InputStream.close() after build() has been called.

Attributes

def trustManager(trustCertCollection: Array[X509Certificate]): this.type

Trusted certificates for verifying the remote endpoint's certificate, null uses the system default.

Trusted certificates for verifying the remote endpoint's certificate, null uses the system default.

Attributes

def trustManager(trustManagerFactory: TrustManagerFactory): this.type

Trusted manager for verifying the remote endpoint's certificate. null uses the system default.

Trusted manager for verifying the remote endpoint's certificate. null uses the system default.

Attributes