mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
fix: Error message
This commit is contained in:
@@ -942,7 +942,6 @@ class GroupActivity : DatabaseLockActivity(),
|
||||
passkeySelectionAction = { searchInfo ->
|
||||
if (!database.isReadOnly
|
||||
&& searchInfo != null
|
||||
// TODO Passkey setting && PreferencesUtil.isAutofillSaveSearchInfoEnable(this@GroupActivity)
|
||||
) {
|
||||
updateEntryWithSearchInfo(database, entryVersioned, searchInfo)
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import android.os.ParcelUuid
|
||||
import android.security.keystore.KeyGenParameterSpec
|
||||
import android.security.keystore.KeyProperties
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.credentials.CreatePublicKeyCredentialRequest
|
||||
import androidx.credentials.CreatePublicKeyCredentialResponse
|
||||
@@ -42,6 +43,7 @@ import androidx.credentials.provider.ProviderGetCredentialRequest
|
||||
import com.kunzisoft.encrypt.Base64Helper.Companion.b64Encode
|
||||
import com.kunzisoft.encrypt.Signature
|
||||
import com.kunzisoft.encrypt.Signature.getApplicationFingerprints
|
||||
import com.kunzisoft.keepass.R
|
||||
import com.kunzisoft.keepass.credentialprovider.passkey.data.AuthenticatorAssertionResponse
|
||||
import com.kunzisoft.keepass.credentialprovider.passkey.data.AuthenticatorAttestationResponse
|
||||
import com.kunzisoft.keepass.credentialprovider.passkey.data.Cbor
|
||||
@@ -64,6 +66,7 @@ import com.kunzisoft.keepass.utils.StringUtil.toHexString
|
||||
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.IOException
|
||||
import java.security.KeyStore
|
||||
import java.security.MessageDigest
|
||||
import java.security.SecureRandom
|
||||
@@ -125,11 +128,15 @@ object PasskeyHelper {
|
||||
}
|
||||
setResult(Activity.RESULT_OK, mReplyIntent)
|
||||
} ?: run {
|
||||
Log.w(javaClass.name, "Failed Passkey manual selection")
|
||||
setResult(Activity.RESULT_CANCELED)
|
||||
throw IOException("No passkey found")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(javaClass.name, "Cant add passkey entry as result", e)
|
||||
Log.e(javaClass.name, "Unable to add the passkey as result", e)
|
||||
Toast.makeText(
|
||||
this,
|
||||
getString(R.string.error_passkey_result),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
setResult(Activity.RESULT_CANCELED)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -762,4 +762,5 @@
|
||||
<string name="passkey_credential_id">Passkey Credential Id</string>
|
||||
<string name="passkey_user_handle">Passkey User Handle</string>
|
||||
<string name="passkey_relying_party">Passkey Relying Party</string>
|
||||
<string name="error_passkey_result">Unable to return the passkey</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user