mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
fix: Private key format #2164
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
package com.kunzisoft.keepass.credentialprovider.passkey.data
|
||||
|
||||
import android.util.Log
|
||||
import androidx.credentials.exceptions.GetCredentialUnknownException
|
||||
import com.kunzisoft.encrypt.Signature
|
||||
import com.kunzisoft.encrypt.Base64Helper.Companion.b64Encode
|
||||
@@ -46,8 +47,12 @@ class AuthenticatorAssertionResponse(
|
||||
private var signature: ByteArray = byteArrayOf()
|
||||
|
||||
init {
|
||||
signature = Signature.sign(privateKey, dataToSign())
|
||||
?: throw GetCredentialUnknownException("signing failed")
|
||||
try {
|
||||
signature = Signature.sign(privateKey, dataToSign())
|
||||
} catch (e: Exception) {
|
||||
Log.e(this::class.java.simpleName, "Unable to sign: ${e.message}")
|
||||
throw GetCredentialUnknownException("Signing failed")
|
||||
}
|
||||
}
|
||||
|
||||
private fun dataToSign(): ByteArray {
|
||||
|
||||
Reference in New Issue
Block a user