From fc9e3eadbdc8e3a7077b2c6673a3351e985a2038 Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Tue, 31 Mar 2020 16:34:38 +0200 Subject: [PATCH] Fix: Indicate self attestation if attestationChallenge==null --- .../me/henneke/wearauthn/fido/context/AuthenticatorContext.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/authenticator/src/main/java/me/henneke/wearauthn/fido/context/AuthenticatorContext.kt b/authenticator/src/main/java/me/henneke/wearauthn/fido/context/AuthenticatorContext.kt index ab28555..1f64dd9 100644 --- a/authenticator/src/main/java/me/henneke/wearauthn/fido/context/AuthenticatorContext.kt +++ b/authenticator/src/main/java/me/henneke/wearauthn/fido/context/AuthenticatorContext.kt @@ -233,7 +233,9 @@ abstract class AuthenticatorContext(private val context: Context, val isHidTrans attestationChallenge = null ) } - return Pair(credential, AttestationType.ANDROID_KEYSTORE) + val attestationType = + if (actualAttestationChallenge != null) AttestationType.ANDROID_KEYSTORE else AttestationType.SELF + return Pair(credential, attestationType) } fun refreshCachedWebAuthnCredentialIfNecessary() {