Package io.ktor.network.tls.certificates

Types

CertificateBuilder

class CertificateBuilder

Builder for certificate

KeyStoreBuilder

class KeyStoreBuilder

Builder for key store

Extensions for External Classes

java.security.KeyStore

Functions

buildKeyStore

fun buildKeyStore(
    block: KeyStoreBuilder.() -> Unit
): KeyStore

Create a keystore and configure it in block function

generateCertificate

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.