Companion

expect object Companion(source)
actual object Companion(source)
actual object Companion(source)

Properties

Functions

Link copied to clipboard
expect fun createIdentity(isServer: Boolean, attributes: Map<String, String>, expiration: Instant?, alias: String): TLSIdentity

Create self-signed certificate and private key, store them in the canonical keystore, and return an identity backed by the new entry. The identity will be stored in the secure storage using the specified alias and can be recovered using that alias, after this method returns.

actual fun createIdentity(isServer: Boolean, attributes: Map<String, String>, expiration: Instant?, alias: String): TLSIdentity
fun createIdentity(isServer: Boolean, attributes: Map<String, String>, expiration: Instant?, keyStore: KeyStore, alias: String, keyPassword: CharArray?): TLSIdentity

Create a self-signed certificate TLSIdentity object. The generated private key will be stored in the KeyStore along with its self-signed certificate.

actual fun createIdentity(isServer: Boolean, attributes: Map<String, String>, expiration: Instant?, alias: String): TLSIdentity
Link copied to clipboard
expect fun deleteIdentity(alias: String)

Delete the identity in the keystore with the given alias.

actual fun deleteIdentity(alias: String)
actual fun deleteIdentity(alias: String)
Link copied to clipboard
expect fun getIdentity(alias: String): TLSIdentity?

Get a TLSIdentity backed by the information for the passed alias.

actual fun getIdentity(alias: String): TLSIdentity?
fun getIdentity(keyStore: KeyStore, alias: String, keyPassword: CharArray?): TLSIdentity?

Get a TLSIdentity object from the give KeyStore, key alias, and key password. The KeyStore must contain the private key along with the certificate chain at the given key alias and password, otherwise null will be returned.

actual fun getIdentity(alias: String): TLSIdentity?
Link copied to clipboard
fun useKeyStore(keyStore: KeyStore, keyPassword: CharArray? = null)

Register a KeyStore and key password to use in common APIs.