io.sureshg.extn / java.security.KeyStore

Extensions for java.security.KeyStore

defaultKeyManager

fun KeyStore.defaultKeyManager(passwd: CharArray? = null): X509KeyManager

Returns the default X509KeyManager for the KeyStore

defaultTrustManager

val KeyStore.defaultTrustManager: X509TrustManager

Returns the default X509TrustManager for the KeyStore

keyManagers

fun KeyStore.keyManagers(passwd: CharArray? = null): List<X509KeyManager>

Returns X509KeyManager for the KeyStore

toPKCS12

fun KeyStore.toPKCS12(keyPasswd: CharArray? = null, aliasFilter: Regex? = null): KeyStore

Returns a new PKCS12 keystore using this keystore entries. Returns the same instance if it's already a PKCS12 one.

trustManagers

val KeyStore.trustManagers: List<X509TrustManager>

Return X509TrustManager for the KeyStore

verifyCRL

fun KeyStore.verifyCRL(crl: X509CRL): String?

Verify the keystore public/private key certificate against the CRL.