Package io.ktor.network.tls
Types
Link copied to clipboard
class CertificateAndKey(certificateChain: Array<X509Certificate>, key: PrivateKey)
Content copied to clipboard
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(code: Short, name: String, openSSLName: String, exchangeType: SecretExchangeType, jdkCipherName: String, keyStrength: Int, fixedIvLength: Int, ivLength: Int, cipherTagSizeInBytes: Int, macName: String, macStrength: Int, hash: HashAlgorithm, signatureAlgorithm: SignatureAlgorithm, cipherType: CipherType)
Content copied to clipboard
Represents a TLS cipher suite
Link copied to clipboard
Cipher type.
Link copied to clipboard
class NoPrivateKeyException(alias: String, store: KeyStore) : IllegalStateException, CopyableThrowable<NoPrivateKeyException>
Content copied to clipboard
Throws if failed to find PrivateKey for any alias in KeyStore.
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
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
fun TLSConfigBuilder.addCertificateChain(chain: Array<X509Certificate>, key: PrivateKey)
Content copied to clipboard
Add client certificate chain to use.
Link copied to clipboard
fun TLSConfigBuilder.addKeyStore(store: KeyStore, password: CharArray?, alias: String? = null)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun <ERROR CLASS>.tls(coroutineContext: CoroutineContext): <ERROR CLASS>
Content copied to clipboard
suspend fun <ERROR CLASS>.tls(coroutineContext: CoroutineContext): <ERROR CLASS>
Content copied to clipboard
Make Socket connection secure with TLS.
suspend fun <ERROR CLASS>.tls(coroutineContext: CoroutineContext, config: TLSConfig): <ERROR CLASS>
Content copied to clipboard
expect suspend fun <ERROR CLASS>.tls(coroutineContext: CoroutineContext, config: TLSConfig): <ERROR CLASS>
Content copied to clipboard
Make Socket connection secure with TLS using TLSConfig.
suspend fun <ERROR CLASS>.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): <ERROR CLASS>
Content copied to clipboard
expect suspend fun <ERROR CLASS>.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): <ERROR CLASS>
Content copied to clipboard
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
Content copied to clipboard
Make Socket connection secure with TLS.