WIP: Real key generation / gestion #24

Closed
stcb wants to merge 7 commits from KeyGeneration2 into dev
Showing only changes of commit d754ba5935 - Show all commits

View File

@ -73,7 +73,7 @@ class KeystoreHelper(private val call: MethodCall, private val result: MethodCha
try { try {
val keyStore = KeyStore.getInstance(ANDROID_KEYSTORE).apply { load(null) } val keyStore = KeyStore.getInstance(ANDROID_KEYSTORE).apply { load(null) }
val privateKey = keyStore.getKey(alias, null) ?: run { val privateKey = keyStore.getKey(alias, null) as? PrivateKey ?: run {
result.error("KEY_NOT_FOUND", "Private key not found for alias \"$alias\".", null) result.error("KEY_NOT_FOUND", "Private key not found for alias \"$alias\".", null)
return return
} }