mirror of
https://github.com/polhenarejos/pico-fido
synced 2026-06-04 03:53:01 +02:00
Set persistent rpId, userName and userDisplay.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include "random.h"
|
#include "random.h"
|
||||||
|
|
||||||
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);
|
||||||
|
extern char *rp_id, *user_name, *display_name;
|
||||||
|
|
||||||
bool residentx = false;
|
bool residentx = false;
|
||||||
Credential credsx[MAX_CREDENTIAL_COUNT_IN_LIST] = { 0 };
|
Credential credsx[MAX_CREDENTIAL_COUNT_IN_LIST] = { 0 };
|
||||||
@@ -205,6 +206,9 @@ int cbor_get_assertion(const uint8_t *data, size_t len, bool next) {
|
|||||||
if (rpId.present == false || clientDataHash.present == false) {
|
if (rpId.present == false || clientDataHash.present == false) {
|
||||||
CBOR_ERROR(CTAP2_ERR_MISSING_PARAMETER);
|
CBOR_ERROR(CTAP2_ERR_MISSING_PARAMETER);
|
||||||
}
|
}
|
||||||
|
rp_id = rpId.data;
|
||||||
|
user_name = NULL;
|
||||||
|
display_name = NULL;
|
||||||
|
|
||||||
uint8_t flags = 0;
|
uint8_t flags = 0;
|
||||||
uint8_t rp_id_hash[32] = {0};
|
uint8_t rp_id_hash[32] = {0};
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "crypto_utils.h"
|
#include "crypto_utils.h"
|
||||||
|
|
||||||
|
char *rp_id = NULL, *user_name = NULL, *display_name = NULL;
|
||||||
|
|
||||||
int cbor_make_credential(const uint8_t *data, size_t len) {
|
int cbor_make_credential(const uint8_t *data, size_t len) {
|
||||||
CborParser parser;
|
CborParser parser;
|
||||||
CborValue map;
|
CborValue map;
|
||||||
@@ -192,6 +194,9 @@ int cbor_make_credential(const uint8_t *data, size_t len) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
CBOR_PARSE_MAP_END(map, 1);
|
CBOR_PARSE_MAP_END(map, 1);
|
||||||
|
rp_id = rp.id.data;
|
||||||
|
user_name = user.parent.name.data;
|
||||||
|
display_name = user.displayName.data;
|
||||||
|
|
||||||
uint8_t flags = FIDO2_AUT_FLAG_AT;
|
uint8_t flags = FIDO2_AUT_FLAG_AT;
|
||||||
uint8_t rp_id_hash[32] = {0};
|
uint8_t rp_id_hash[32] = {0};
|
||||||
|
|||||||
Reference in New Issue
Block a user