mirror of
https://github.com/polhenarejos/pico-fido.git
synced 2025-12-18 09:30:04 +08:00
Renaming authenticator selection.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -60,7 +60,7 @@ target_sources(pico_fido PUBLIC
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/src/fido/cbor_client_pin.c
|
${CMAKE_CURRENT_LIST_DIR}/src/fido/cbor_client_pin.c
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/fido/credential.c
|
${CMAKE_CURRENT_LIST_DIR}/src/fido/credential.c
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/fido/cbor_get_assertion.c
|
${CMAKE_CURRENT_LIST_DIR}/src/fido/cbor_get_assertion.c
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/fido/cbor_authenticator_selection.c
|
${CMAKE_CURRENT_LIST_DIR}/src/fido/cbor_selection.c
|
||||||
)
|
)
|
||||||
set(HSM_DRIVER "hid")
|
set(HSM_DRIVER "hid")
|
||||||
include(pico-hsm-sdk/pico_hsm_sdk_import.cmake)
|
include(pico-hsm-sdk/pico_hsm_sdk_import.cmake)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ int cbor_make_credential(const uint8_t *data, size_t len);
|
|||||||
int cbor_client_pin(const uint8_t *data, size_t len);
|
int cbor_client_pin(const uint8_t *data, size_t len);
|
||||||
int cbor_get_assertion(const uint8_t *data, size_t len, bool next);
|
int cbor_get_assertion(const uint8_t *data, size_t len, bool next);
|
||||||
int cbor_get_next_assertion(const uint8_t *data, size_t len);
|
int cbor_get_next_assertion(const uint8_t *data, size_t len);
|
||||||
int cbor_authenticator_selection();
|
int cbor_selection();
|
||||||
|
|
||||||
const uint8_t aaguid[16] = {0x89, 0xFB, 0x94, 0xB7, 0x06, 0xC9, 0x36, 0x73, 0x9B, 0x7E, 0x30, 0x52, 0x6D, 0x96, 0x81, 0x45}; // First 16 bytes of SHA256("Pico FIDO2")
|
const uint8_t aaguid[16] = {0x89, 0xFB, 0x94, 0xB7, 0x06, 0xC9, 0x36, 0x73, 0x9B, 0x7E, 0x30, 0x52, 0x6D, 0x96, 0x81, 0x45}; // First 16 bytes of SHA256("Pico FIDO2")
|
||||||
|
|
||||||
@@ -58,8 +58,8 @@ int cbor_parse(const uint8_t *data, size_t len) {
|
|||||||
return cbor_get_assertion(data + 1, len - 1, false);
|
return cbor_get_assertion(data + 1, len - 1, false);
|
||||||
else if (data[0] == CTAP_GET_NEXT_ASSERTION)
|
else if (data[0] == CTAP_GET_NEXT_ASSERTION)
|
||||||
return cbor_get_next_assertion(data + 1, len - 1);
|
return cbor_get_next_assertion(data + 1, len - 1);
|
||||||
else if (data[0] == CTAP_AUTHENTICATOR_SEL)
|
else if (data[0] == CTAP_SELECTION)
|
||||||
return cbor_authenticator_selection();
|
return cbor_selection();
|
||||||
return CTAP2_ERR_INVALID_CBOR;
|
return CTAP2_ERR_INVALID_CBOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include "ctap.h"
|
#include "ctap.h"
|
||||||
#include "bsp/board.h"
|
#include "bsp/board.h"
|
||||||
|
|
||||||
int cbor_authenticator_selection() {
|
int cbor_selection() {
|
||||||
if (wait_button_pressed() == true)
|
if (wait_button_pressed() == true)
|
||||||
return CTAP2_ERR_USER_ACTION_TIMEOUT;
|
return CTAP2_ERR_USER_ACTION_TIMEOUT;
|
||||||
return CTAP2_OK;
|
return CTAP2_OK;
|
||||||
@@ -113,7 +113,7 @@ typedef struct {
|
|||||||
#define CTAP_RESET 0x07
|
#define CTAP_RESET 0x07
|
||||||
#define CTAP_GET_NEXT_ASSERTION 0x08
|
#define CTAP_GET_NEXT_ASSERTION 0x08
|
||||||
#define CTAP_CREDENTIAL_MGMT 0x0A
|
#define CTAP_CREDENTIAL_MGMT 0x0A
|
||||||
#define CTAP_AUTHENTICATOR_SEL 0x0B
|
#define CTAP_SELECTION 0x0B
|
||||||
|
|
||||||
// Command status responses
|
// Command status responses
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user