From 16ed3cb7c601f25c598b59c773b238cc60ae264a Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Thu, 27 Oct 2022 18:53:33 +0200 Subject: [PATCH] MRTD reset auth on retry --- applications/main/nfc/scenes/nfc_scene_passport_read_auth.c | 2 ++ applications/main/nfc/scenes/nfc_scene_read.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/applications/main/nfc/scenes/nfc_scene_passport_read_auth.c b/applications/main/nfc/scenes/nfc_scene_passport_read_auth.c index cc5c294d4..7dddc7fa1 100644 --- a/applications/main/nfc/scenes/nfc_scene_passport_read_auth.c +++ b/applications/main/nfc/scenes/nfc_scene_passport_read_auth.c @@ -97,6 +97,8 @@ bool nfc_scene_passport_read_auth_on_event(void* context, SceneManagerEvent even if(event.type == SceneManagerEventTypeCustom) { if(event.event == GuiButtonTypeLeft) { + nfc->dev->dev_data.mrtd_data.auth_success = false; + nfc->dev->dev_data.mrtd_data.auth.method = MrtdAuthMethodNone; scene_manager_next_scene(nfc->scene_manager, NfcSceneRetryConfirm); consumed = true; } else if(event.event == GuiButtonTypeCenter) { diff --git a/applications/main/nfc/scenes/nfc_scene_read.c b/applications/main/nfc/scenes/nfc_scene_read.c index 434fdadd6..09e3d79be 100644 --- a/applications/main/nfc/scenes/nfc_scene_read.c +++ b/applications/main/nfc/scenes/nfc_scene_read.c @@ -85,6 +85,9 @@ bool nfc_scene_read_on_event(void* context, SceneManagerEvent event) { consumed = true; } else if(event.event == NfcWorkerEventReadPassport) { notification_message(nfc->notifications, &sequence_success); + FURI_LOG_D("NFC", "Read passport, auth: %d, success: %d", + nfc->dev->dev_data.mrtd_data.auth.method, + nfc->dev->dev_data.mrtd_data.auth_success); if(nfc->dev->dev_data.mrtd_data.auth_success) { scene_manager_next_scene(nfc->scene_manager, NfcScenePassportReadAuthSuccess); } else {