From 513642663b9e5ec4ab83cbc0afa14885421b5442 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Sat, 24 May 2025 14:49:15 +0200 Subject: [PATCH] Move PRODUCT def to another file. Signed-off-by: Pol Henarejos --- CMakeLists.txt | 1 + src/fido/defs.c | 20 ++++++++++++++++++++ src/fido/fido.c | 2 -- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/fido/defs.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 751011d..caac366 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,7 @@ set(SOURCES ${SOURCES} ${CMAKE_CURRENT_LIST_DIR}/src/fido/cbor_vendor.c ${CMAKE_CURRENT_LIST_DIR}/src/fido/cbor_large_blobs.c ${CMAKE_CURRENT_LIST_DIR}/src/fido/management.c + ${CMAKE_CURRENT_LIST_DIR}/src/fido/defs.c ) if (${ENABLE_OATH_APP}) set(SOURCES ${SOURCES} diff --git a/src/fido/defs.c b/src/fido/defs.c new file mode 100644 index 0000000..4089fce --- /dev/null +++ b/src/fido/defs.c @@ -0,0 +1,20 @@ +/* + * This file is part of the Pico FIDO distribution (https://github.com/polhenarejos/pico-fido). + * Copyright (c) 2022 Pol Henarejos. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + #include "fido.h" + +uint8_t PICO_PRODUCT = 2; // Pico FIDO diff --git a/src/fido/fido.c b/src/fido/fido.c index 4bf833e..b4e1d1c 100644 --- a/src/fido/fido.c +++ b/src/fido/fido.c @@ -41,8 +41,6 @@ int fido_process_apdu(); int fido_unload(); -uint8_t PICO_PRODUCT = 2; // Pico FIDO - pinUvAuthToken_t paut = { 0 }; uint8_t keydev_dec[32];