diff --git a/src/fido/ctap.h b/src/fido/ctap.h index 15bb84d..a7dfa03 100644 --- a/src/fido/ctap.h +++ b/src/fido/ctap.h @@ -129,8 +129,7 @@ typedef struct { #define CTAP_VENDOR_MSE 0x02 #define CTAP_VENDOR_UNLOCK 0x03 #define CTAP_VENDOR_EA 0x04 -#define CTAP_VENDOR_PHY_OPTS 0x05 -#define CTAP_VENDOR_MEMORY 0x06 +#define CTAP_VENDOR_ADMIN_PIN 0x08 #define CTAP_PERMISSION_MC 0x01 // MakeCredential #define CTAP_PERMISSION_GA 0x02 // GetAssertion diff --git a/src/fido/fido.c b/src/fido/fido.c index 2c24c0f..5c4b456 100644 --- a/src/fido/fido.c +++ b/src/fido/fido.c @@ -442,6 +442,7 @@ int scan_files_fido() { printf("FATAL ERROR: Global counter not found in memory!\r\n"); } ef_pin = search_by_fid(EF_PIN, NULL, SPECIFY_EF); + ef_pin_admin = search_by_fid(EF_PIN_ADMIN, NULL, SPECIFY_EF); ef_authtoken = search_by_fid(EF_AUTHTOKEN, NULL, SPECIFY_EF); if (ef_authtoken) { if (!file_has_data(ef_authtoken)) { diff --git a/src/fido/files.c b/src/fido/files.c index bc278d5..d2280db 100644 --- a/src/fido/files.c +++ b/src/fido/files.c @@ -32,6 +32,7 @@ file_t file_entries[] = { { .fid = EF_OPTS, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = { 0xff } }, // Global options { .fid = EF_LARGEBLOB, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = { 0xff } }, // Large Blob { .fid = EF_OTP_PIN, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = { 0xff } }, + { .fid = EF_PIN_ADMIN, .parent = 0, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = { 0xff } }, // ADMIN PIN { .fid = 0x0000, .parent = 0xff, .name = NULL, .type = FILE_TYPE_NOT_KNOWN, .data = NULL, .ef_structure = 0, .acl = { 0 } } //end }; @@ -41,6 +42,7 @@ file_t *ef_keydev = NULL; file_t *ef_certdev = NULL; file_t *ef_counter = NULL; file_t *ef_pin = NULL; +file_t *ef_pin_admin = NULL; file_t *ef_authtoken = NULL; file_t *ef_keydev_enc = NULL; file_t *ef_largeblob = NULL; diff --git a/src/fido/files.h b/src/fido/files.h index 715a306..2e38174 100644 --- a/src/fido/files.h +++ b/src/fido/files.h @@ -28,6 +28,7 @@ #define EF_COUNTER 0xC000 #define EF_OPTS 0xC001 #define EF_PIN 0x1080 +#define EF_PIN_ADMIN 0x1084 #define EF_AUTHTOKEN 0x1090 #define EF_PAUTHTOKEN 0x1091 #define EF_MINPINLEN 0x1100 @@ -48,6 +49,7 @@ extern file_t *ef_keydev; extern file_t *ef_certdev; extern file_t *ef_counter; extern file_t *ef_pin; +extern file_t *ef_pin_admin; extern file_t *ef_authtoken; extern file_t *ef_keydev_enc; extern file_t *ef_largeblob;