mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
fix false-positive emv protocol detect
This commit is contained in:
parent
3f29295380
commit
0397dd0a40
3 changed files with 3 additions and 6 deletions
|
@ -66,11 +66,6 @@ void nfc_render_emv_country(uint16_t country_code, FuriString* str) {
|
|||
void nfc_render_emv_application(const EmvApplication* apl, FuriString* str) {
|
||||
const uint8_t len = apl->aid_len;
|
||||
|
||||
if(!len) {
|
||||
furi_string_cat_printf(str, "No Pay Application found\n");
|
||||
return;
|
||||
}
|
||||
|
||||
furi_string_cat_printf(str, "AID: ");
|
||||
for(uint8_t i = 0; i < len; i++) furi_string_cat_printf(str, "%02X", apl->aid[i]);
|
||||
furi_string_cat_printf(str, "\n");
|
||||
|
|
|
@ -10,6 +10,8 @@ extern "C" {
|
|||
|
||||
#define EMV_REQ_GET_DATA 0x80CA
|
||||
|
||||
#define UNKNOWN_TAG 0x0B
|
||||
|
||||
#define EMV_TAG_AID 0x4F
|
||||
#define EMV_TAG_PRIORITY 0x87
|
||||
#define EMV_TAG_APPL_INTERCHANGE_PROFILE 0x82
|
||||
|
|
|
@ -186,7 +186,7 @@ static bool emv_poller_detect(NfcGenericEvent event, void* context) {
|
|||
|
||||
if(iso14443_4a_event->type == Iso14443_4aPollerEventTypeReady) {
|
||||
const EmvError error = emv_poller_select_ppse(instance);
|
||||
protocol_detected = (error == EmvErrorNone);
|
||||
protocol_detected = (error == EmvErrorNone) && (instance->data->emv_application.aid_len);
|
||||
}
|
||||
|
||||
return protocol_detected;
|
||||
|
|
Loading…
Reference in a new issue