Package io.ktor.network.tls.certificates

Types

Link copied to clipboard
class CertificateBuilder

Builder for certificate

Link copied to clipboard
class KeyStoreBuilder

Builder for key store

Functions

Link copied to clipboard
fun buildKeyStore(block: KeyStoreBuilder.() -> Unit): KeyStore

Create a keystore and configure it in block function

Link copied to clipboard
fun generateCertificate(file: File, algorithm: String = "SHA1withRSA", keyAlias: String = "mykey", keyPassword: String = "changeit", jksPassword: String = keyPassword, keySizeInBits: Int = 1024): KeyStore

Generates simple self-signed certificate with keyAlias name, private key is encrypted with keyPassword, and a JKS keystore to hold it in file with jksPassword.

Link copied to clipboard
fun KeyStore.saveToFile(output: File, password: String)

Save KeyStore to output file with the specified password