Package-level declarations

Types

Link copied to clipboard
class CertificateAndKey(val certificateChain: Array<X509Certificate>, val key: PrivateKey)

Client certificate chain with private key.

Link copied to clipboard

CIO cipher suites collection https://www.ietf.org/rfc/rfc5289.txt https://tools.ietf.org/html/rfc5288#section-3

Link copied to clipboard
data class CipherSuite(val code: Short, val name: String, val openSSLName: String, val exchangeType: SecretExchangeType, val jdkCipherName: String, val keyStrength: Int, val fixedIvLength: Int, val ivLength: Int, val cipherTagSizeInBytes: Int, val macName: String, val macStrength: Int, val hash: HashAlgorithm, val signatureAlgorithm: SignatureAlgorithm, val cipherType: CipherType = CipherType.GCM)

Represents a TLS cipher suite

Link copied to clipboard

Cipher type.

Link copied to clipboard

Throws if failed to find PrivateKey for any alias in KeyStore.

Link copied to clipboard
data class OID(val identifier: String)
Link copied to clipboard

TLS secret key exchange type.

Link copied to clipboard

Server key exchange type with it's code

Link copied to clipboard

TLS alert level

Link copied to clipboard

TLS alert types with codes

Link copied to clipboard
expect class TLSConfig
actual class TLSConfig

TLS configuration.

actual class TLSConfig
Link copied to clipboard
expect class TLSConfigBuilder

TLSConfig builder.

actual class TLSConfigBuilder

TLSConfig builder.

actual class TLSConfigBuilder

TLSConfig builder.

Link copied to clipboard

TLS handshake record type

Link copied to clipboard

TLS record type with it's numeric code

Link copied to clipboard

TLS version

Functions

Link copied to clipboard

Add client certificate chain to use.

Link copied to clipboard
@JvmName(name = "addKeyStoreNullablePassword")
fun TLSConfigBuilder.addKeyStore(store: KeyStore, password: CharArray?, alias: String? = null)

Add client certificates from store by using the certificate with specific alias or all certificates, if alias is null.

Link copied to clipboard

Converts the provided algorithm name from the standard Signature algorithms into the corresponding KeyPairGenerator algorithm name.

Link copied to clipboard

Append config from other builder.

Append config from other builder.

Append config from other builder.

Link copied to clipboard
suspend fun Connection.tls(coroutineContext: CoroutineContext): Socket
suspend fun Socket.tls(coroutineContext: CoroutineContext): Socket

Make Socket connection secure with TLS.

suspend fun Connection.tls(coroutineContext: CoroutineContext, config: TLSConfig): Socket
expect suspend fun Socket.tls(coroutineContext: CoroutineContext, config: TLSConfig): Socket

Make Socket connection secure with TLS using TLSConfig.

suspend fun Connection.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): Socket
expect suspend fun Socket.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): Socket

Make Socket connection secure with TLS configured with block.

actual suspend fun Socket.tls(coroutineContext: CoroutineContext, config: TLSConfig): Socket

Make Socket connection secure with TLS using TLSConfig.

actual suspend fun Socket.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): Socket

Make Socket connection secure with TLS configured with block.

suspend fun Socket.tls(coroutineContext: CoroutineContext, trustManager: X509TrustManager? = null, randomAlgorithm: String = "NativePRNGNonBlocking", cipherSuites: List<CipherSuite> = CIOCipherSuites.SupportedSuites, serverName: String? = null): Socket

Make Socket connection secure with TLS.

actual suspend fun Socket.tls(coroutineContext: CoroutineContext, config: TLSConfig): Socket

Make Socket connection secure with TLS using TLSConfig.

actual suspend fun Socket.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): Socket

Make Socket connection secure with TLS configured with block.