@@ -76,10 +76,14 @@ bool emv_load(EmvData* data, FlipperFormat* ff, uint32_t version) {
76
76
77
77
EmvApplication * app = & data -> emv_application ;
78
78
79
- //Read name
80
- if (!flipper_format_read_string (ff , "Name" , temp_str )) break ;
81
- strcpy (app -> name , furi_string_get_cstr (temp_str ));
82
- if (app -> name [0 ] != '\0' ) app -> name_found = true;
79
+ flipper_format_read_string (ff , "Cardholder name" , temp_str );
80
+ strcpy (app -> cardholder_name , furi_string_get_cstr (temp_str ));
81
+
82
+ flipper_format_read_string (ff , "Application name" , temp_str );
83
+ strcpy (app -> application_name , furi_string_get_cstr (temp_str ));
84
+
85
+ flipper_format_read_string (ff , "Application label" , temp_str );
86
+ strcpy (app -> application_label , furi_string_get_cstr (temp_str ));
83
87
84
88
uint32_t pan_len ;
85
89
if (!flipper_format_read_uint32 (ff , "PAN length" , & pan_len , 1 )) break ;
@@ -93,15 +97,24 @@ bool emv_load(EmvData* data, FlipperFormat* ff, uint32_t version) {
93
97
94
98
if (!flipper_format_read_hex (ff , "AID" , app -> aid , aid_len )) break ;
95
99
100
+ if (!flipper_format_read_hex (
101
+ ff , "Application interchange profile" , app -> application_interchange_profile , 2 ))
102
+ break ;
103
+
96
104
if (!flipper_format_read_hex (ff , "Country code" , (uint8_t * )& app -> country_code , 2 )) break ;
97
105
98
106
if (!flipper_format_read_hex (ff , "Currency code" , (uint8_t * )& app -> currency_code , 2 )) break ;
99
107
100
108
if (!flipper_format_read_hex (ff , "Expiration year" , & app -> exp_year , 1 )) break ;
101
109
if (!flipper_format_read_hex (ff , "Expiration month" , & app -> exp_month , 1 )) break ;
110
+ if (!flipper_format_read_hex (ff , "Expiration day" , & app -> exp_day , 1 )) break ;
111
+
112
+ if (!flipper_format_read_hex (ff , "Effective year" , & app -> effective_year , 1 )) break ;
113
+ if (!flipper_format_read_hex (ff , "Effective month" , & app -> effective_month , 1 )) break ;
114
+ if (!flipper_format_read_hex (ff , "Effective day" , & app -> effective_day , 1 )) break ;
102
115
103
116
uint32_t pin_try_counter ;
104
- if (!flipper_format_read_uint32 (ff , "PIN counter" , & pin_try_counter , 1 )) break ;
117
+ if (!flipper_format_read_uint32 (ff , "PIN try counter" , & pin_try_counter , 1 )) break ;
105
118
app -> pin_try_counter = pin_try_counter ;
106
119
107
120
parsed = true;
@@ -124,7 +137,12 @@ bool emv_save(const EmvData* data, FlipperFormat* ff) {
124
137
125
138
if (!flipper_format_write_comment_cstr (ff , "EMV specific data:\n" )) break ;
126
139
127
- if (!flipper_format_write_string_cstr (ff , "Name" , app .name )) break ;
140
+ if (!flipper_format_write_string_cstr (ff , "Cardholder name" , app .cardholder_name )) break ;
141
+
142
+ if (!flipper_format_write_string_cstr (ff , "Application name" , app .application_name )) break ;
143
+
144
+ if (!flipper_format_write_string_cstr (ff , "Application label" , app .application_label ))
145
+ break ;
128
146
129
147
uint32_t pan_len = app .pan_len ;
130
148
if (!flipper_format_write_uint32 (ff , "PAN length" , & pan_len , 1 )) break ;
@@ -136,15 +154,25 @@ bool emv_save(const EmvData* data, FlipperFormat* ff) {
136
154
137
155
if (!flipper_format_write_hex (ff , "AID" , app .aid , aid_len )) break ;
138
156
157
+ if (!flipper_format_write_hex (
158
+ ff , "Application interchange profile" , app .application_interchange_profile , 2 ))
159
+ break ;
160
+
139
161
if (!flipper_format_write_hex (ff , "Country code" , (uint8_t * )& app .country_code , 2 )) break ;
140
162
141
163
if (!flipper_format_write_hex (ff , "Currency code" , (uint8_t * )& app .currency_code , 2 )) break ;
142
164
143
165
if (!flipper_format_write_hex (ff , "Expiration year" , (uint8_t * )& app .exp_year , 1 )) break ;
144
-
145
166
if (!flipper_format_write_hex (ff , "Expiration month" , (uint8_t * )& app .exp_month , 1 )) break ;
167
+ if (!flipper_format_write_hex (ff , "Expiration day" , (uint8_t * )& app .exp_day , 1 )) break ;
168
+
169
+ if (!flipper_format_write_hex (ff , "Effective year" , (uint8_t * )& app .effective_year , 1 ))
170
+ break ;
171
+ if (!flipper_format_write_hex (ff , "Effective month" , (uint8_t * )& app .effective_month , 1 ))
172
+ break ;
173
+ if (!flipper_format_write_hex (ff , "Effective day" , (uint8_t * )& app .effective_day , 1 )) break ;
146
174
147
- if (!flipper_format_write_uint32 (ff , "PIN counter" , (uint32_t * )& app .pin_try_counter , 1 ))
175
+ if (!flipper_format_write_uint32 (ff , "PIN try counter" , (uint32_t * )& app .pin_try_counter , 1 ))
148
176
break ;
149
177
150
178
saved = true;
0 commit comments