mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-24 02:51:34 -08:00
fix: Passkey workflow
This commit is contained in:
4 files changed
+592
-419
No files matched your search
@@ -44,12 +44,19 @@ data class AppOrigin(
|
||||
this.webOrigins.add(webOrigin)
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether at least one signature is present in the Android origins
|
||||
*/
|
||||
fun containsAndroidOriginSignature(): Boolean {
|
||||
return androidOrigins.any { !it.fingerprint.isNullOrEmpty() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the app origin by comparing it to the list of android origins,
|
||||
* return the first verified origin or throw an exception if none is found
|
||||
*/
|
||||
fun checkAppOrigin(compare: AppOrigin): String {
|
||||
if (compare.androidOrigins.isNotEmpty()) {
|
||||
if (compare.containsAndroidOriginSignature().not()) {
|
||||
throw SignatureNotFoundException(this, "Android origin not found")
|
||||
}
|
||||
return androidOrigins.firstOrNull { androidOrigin ->
|
||||
|
||||
Reference in new issue
Block a user