TLSConfigBuilder

class TLSConfigBuilder

TLSConfig builder.

Constructors

<init>

TLSConfigBuilder()

TLSConfig builder.

Properties

certificates

val certificates: MutableList<CertificateAndKey>

List of client certificate chains with private keys.

cipherSuites

var cipherSuites: List<CipherSuite>

List of allowed CipherSuites.

random

var random: SecureRandom?

SecureRandom to use in encryption.

serverName

var serverName: String?

Custom server name for TLS server name extension. See also: https://en.wikipedia.org/wiki/Server_Name_Indication

trustManager

var trustManager: TrustManager?

Custom X509TrustManager to verify server authority.

Functions

build

fun build(): TLSConfig

Create TLSConfig.

Extension Functions

addCertificateChain

fun TLSConfigBuilder.addCertificateChain(
    chain: Array<X509Certificate>,
    key: PrivateKey
): Unit

Add client certificate chain to use.

addKeyStore

fun TLSConfigBuilder.addKeyStore(
    store: KeyStore,
    password: CharArray
): Unit

Add client certificates from store.