From 9c90095e96d56f07016dfeb8ee893d61a9b190f8 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 18 Sep 2023 01:35:57 +0200 Subject: [PATCH] CBOR errors are not sent through CTAPHID_ERROR command, but in CBOR response instead. Fixes #16 Signed-off-by: Pol Henarejos --- src/fido/cbor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fido/cbor.c b/src/fido/cbor.c index e80f513..f9e9269 100644 --- a/src/fido/cbor.c +++ b/src/fido/cbor.c @@ -111,6 +111,10 @@ void cbor_thread() { if (apdu.sw == 0) { DEBUG_DATA(res_APDU + 1, res_APDU_size); } + else { + res_APDU[0] = apdu.sw; + apdu.sw = 0; + } finished_data_size = res_APDU_size + 1;