This commit is contained in:
parent
97ce022436
commit
d754ba5935
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user