From ab4ebe9da6ac35c159262115a7cf16d70307b797 Mon Sep 17 00:00:00 2001 From: Fan DANG Date: Fri, 13 Dec 2024 13:28:14 +0800 Subject: [PATCH] allow fetching nfc enable status without an admin pin --- applets/admin/admin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/applets/admin/admin.c b/applets/admin/admin.c index 186db137..64270c60 100644 --- a/applets/admin/admin.c +++ b/applets/admin/admin.c @@ -223,6 +223,10 @@ int admin_process_apdu(const CAPDU *capdu, RAPDU *rapdu) { ret = admin_vendor_hw_sn(capdu, rapdu); goto done; + case ADMIN_INS_NFC_ENABLE: + ret = admin_vendor_nfc_enable(capdu, rapdu); + goto done; + case ADMIN_INS_FACTORY_RESET: ret = admin_factory_reset(capdu, rapdu); goto done; @@ -267,9 +271,6 @@ int admin_process_apdu(const CAPDU *capdu, RAPDU *rapdu) { case ADMIN_INS_RESET_CTAP: ret = ctap_install(1); break; - case ADMIN_INS_NFC_ENABLE: - ret = admin_vendor_nfc_enable(capdu, rapdu); - break; case ADMIN_INS_READ_CTAP_SM2_CONFIG: ret = ctap_read_sm2_config(capdu, rapdu); break;