Skip to content

Commit c376756

Browse files
committed
Stringify various EMV fields
* Log Format; field 9F4F * Biometric Try Counters Template; field BF4C * Preferred Attempts Template; field BF4D
1 parent 9c81a50 commit c376756

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/emv_strings.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,15 @@ int emv_tlv_get_info(
11411141
info->format = EMV_FORMAT_ANS;
11421142
return emv_tlv_value_get_string(tlv, info->format, 0, value_str, value_str_len);
11431143

1144+
case EMV_TAG_9F4F_LOG_FORMAT:
1145+
info->tag_name = "Log Format";
1146+
info->tag_desc =
1147+
"List (in tag and length format) of data objects representing "
1148+
"the logged data elements that are passed to the terminal when "
1149+
"a transaction log record is read";
1150+
info->format = EMV_FORMAT_DOL;
1151+
return 0;
1152+
11441153
case 0x9F5D: // Used for different purposes by different kernels
11451154
if (tlv->tag == MASTERCARD_TAG_9F5D_APPLICATION_CAPABILITIES_INFORMATION && // Helps IDE find this case statement
11461155
tlv->length == 3
@@ -1442,6 +1451,21 @@ int emv_tlv_get_info(
14421451
info->format = EMV_FORMAT_VAR;
14431452
return 0;
14441453

1454+
case EMV_TAG_BF4C_BIOMETRIC_TRY_COUNTERS_TEMPLATE:
1455+
info->tag_name = "Biometric Try Counters Template";
1456+
info->tag_desc =
1457+
"A template that contains one or more Biometric Try Counters";
1458+
info->format = EMV_FORMAT_VAR;
1459+
return 0;
1460+
1461+
case EMV_TAG_BF4D_PREFERRED_ATTEMPTS_TEMPLATE:
1462+
info->tag_name = "Preferred Attempts Template";
1463+
info->tag_desc =
1464+
"A template that contains the TLV-coded values for the "
1465+
"preferred attempts of any BIT of a Biometric Type";
1466+
info->format = EMV_FORMAT_VAR;
1467+
return 0;
1468+
14451469
default:
14461470
info->format = EMV_FORMAT_B;
14471471
return 1;

src/emv_tags.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ __BEGIN_DECLS
412412
/// EMV tag 9F4E Merchant Name and Location
413413
#define EMV_TAG_9F4E_MERCHANT_NAME_AND_LOCATION (0x9F4E)
414414

415+
/// EMV tag 9F4F Log Format
416+
#define EMV_TAG_9F4F_LOG_FORMAT (0x9F4F)
417+
415418
/// Mastercard tag 9F5D Application Capabilities Information. Template BF0C.
416419
/// @remark See EMV Contactless Book C-2 v2.11, Annex A.1.9
417420
#define MASTERCARD_TAG_9F5D_APPLICATION_CAPABILITIES_INFORMATION (0x9F5D)
@@ -487,6 +490,12 @@ __BEGIN_DECLS
487490
/// EMV tag BF0C File Control Information (FCI) Issuer Discretionary Data. Template A5.
488491
#define EMV_TAG_BF0C_FCI_ISSUER_DISCRETIONARY_DATA (0xBF0C)
489492

493+
/// EMV tag BF4C Biometric Try Counters Template
494+
#define EMV_TAG_BF4C_BIOMETRIC_TRY_COUNTERS_TEMPLATE (0xBF4C)
495+
496+
/// EMV tag BF4D Preferred Attempts Template
497+
#define EMV_TAG_BF4D_PREFERRED_ATTEMPTS_TEMPLATE (0xBF4D)
498+
490499
__END_DECLS
491500

492501
#endif

0 commit comments

Comments
 (0)