mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-18 20:29:44 -07:00
MRTD rename mrtd_data.auth.bac to mrtd_data.auth
This commit is contained in:
@@ -40,17 +40,17 @@ void nfc_scene_passport_bac_on_enter(void* context) {
|
||||
const size_t temp_str_size = 10;
|
||||
char temp_str[temp_str_size];
|
||||
snprintf(temp_str, temp_str_size, "%02u%02u%02u",
|
||||
nfc->dev->dev_data.mrtd_data.auth.bac.birth_date.year,
|
||||
nfc->dev->dev_data.mrtd_data.auth.bac.birth_date.month,
|
||||
nfc->dev->dev_data.mrtd_data.auth.bac.birth_date.day);
|
||||
nfc->dev->dev_data.mrtd_data.auth.birth_date.year,
|
||||
nfc->dev->dev_data.mrtd_data.auth.birth_date.month,
|
||||
nfc->dev->dev_data.mrtd_data.auth.birth_date.day);
|
||||
|
||||
item = variable_item_list_add(variable_item_list, "Birth Date", 1, NULL, NULL);
|
||||
variable_item_set_current_value_text(item, temp_str);
|
||||
|
||||
snprintf(temp_str, temp_str_size, "%02u%02u%02u",
|
||||
nfc->dev->dev_data.mrtd_data.auth.bac.expiry_date.year,
|
||||
nfc->dev->dev_data.mrtd_data.auth.bac.expiry_date.month,
|
||||
nfc->dev->dev_data.mrtd_data.auth.bac.expiry_date.day);
|
||||
nfc->dev->dev_data.mrtd_data.auth.expiry_date.year,
|
||||
nfc->dev->dev_data.mrtd_data.auth.expiry_date.month,
|
||||
nfc->dev->dev_data.mrtd_data.auth.expiry_date.day);
|
||||
|
||||
item = variable_item_list_add(variable_item_list, "Expiry Date", 1, NULL, NULL);
|
||||
variable_item_set_current_value_text(item, temp_str);
|
||||
|
||||
@@ -29,11 +29,11 @@ void nfc_scene_passport_date_on_enter(void* context) {
|
||||
switch(date_type) {
|
||||
case NFC_PASSPORT_DATE_BIRTH:
|
||||
text_input_set_header_text(text_input, "Birth Date");
|
||||
date_value = nfc->dev->dev_data.mrtd_data.auth.bac.birth_date;
|
||||
date_value = nfc->dev->dev_data.mrtd_data.auth.birth_date;
|
||||
break;
|
||||
case NFC_PASSPORT_DATE_EXPIRY:
|
||||
text_input_set_header_text(text_input, "Expiry Date");
|
||||
date_value = nfc->dev->dev_data.mrtd_data.auth.bac.expiry_date;
|
||||
date_value = nfc->dev->dev_data.mrtd_data.auth.expiry_date;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -90,10 +90,10 @@ bool nfc_scene_passport_date_save(Nfc* nfc) {
|
||||
//TODO: use types in .h file? also in nfc_scene_passport_bac.c
|
||||
switch(date_type) {
|
||||
case NFC_PASSPORT_DATE_BIRTH:
|
||||
nfc->dev->dev_data.mrtd_data.auth.bac.birth_date = date_value;
|
||||
nfc->dev->dev_data.mrtd_data.auth.birth_date = date_value;
|
||||
break;
|
||||
case NFC_PASSPORT_DATE_EXPIRY:
|
||||
nfc->dev->dev_data.mrtd_data.auth.bac.expiry_date = date_value;
|
||||
nfc->dev->dev_data.mrtd_data.auth.expiry_date = date_value;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,13 +18,6 @@ typedef struct {
|
||||
// NULL terminated document ID
|
||||
#define MRTD_DOCNR_MAX_LENGTH 21
|
||||
|
||||
typedef struct {
|
||||
// BAC input fields
|
||||
MrtdDate birth_date;
|
||||
MrtdDate expiry_date;
|
||||
char doc_number[MRTD_DOCNR_MAX_LENGTH];
|
||||
} MrtdBacData;
|
||||
|
||||
typedef enum {
|
||||
MrtdAuthMethodBac,
|
||||
MrtdAuthMethodPace,
|
||||
@@ -32,9 +25,13 @@ typedef enum {
|
||||
|
||||
typedef struct {
|
||||
MrtdAuthMethod method;
|
||||
union {
|
||||
MrtdBacData bac;
|
||||
};
|
||||
|
||||
// BAC input fields
|
||||
MrtdDate birth_date;
|
||||
MrtdDate expiry_date;
|
||||
char doc_number[MRTD_DOCNR_MAX_LENGTH];
|
||||
|
||||
//TODO: PACE
|
||||
} MrtdAuthData;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user