emv_tags [-Wmissing-field-initializers]

This commit is contained in:
Philippe Teuwen 2019-04-10 23:13:00 +02:00
parent 3cd047be5d
commit 6416de1a38

View file

@ -175,255 +175,254 @@ static const struct emv_tag_bit EMV_CVR[] = {
// http://dexterous-programmer.blogspot.in/2012/05/emv-tags.html
static const struct emv_tag emv_tags[] = {
// internal
{ 0x00, "Unknown ???" },
{ 0x01, "", EMV_TAG_STRING }, // string for headers
{ 0x02, "Raw data" }, // data
{ 0x06, "Object Identifier (OID)" },
{ 0x20, "Cardholder Verification Results (CVR)", EMV_TAG_CVR }, // not standard!
{ 0x21, "Input list for Offline Data Authentication" }, // not standard! data for "Offline Data Authentication" come from "read records" command. (EMV book3 10.3)
{ 0x00, "Unknown ???", EMV_TAG_GENERIC, NULL },
{ 0x01, "", EMV_TAG_STRING, NULL }, // string for headers
{ 0x02, "Raw data", EMV_TAG_GENERIC, NULL }, // data
{ 0x06, "Object Identifier (OID)", EMV_TAG_GENERIC, NULL },
{ 0x20, "Cardholder Verification Results (CVR)", EMV_TAG_CVR, NULL }, // not standard!
{ 0x21, "Input list for Offline Data Authentication", EMV_TAG_GENERIC, NULL }, // not standard! data for "Offline Data Authentication" come from "read records" command. (EMV book3 10.3)
// EMV
{ 0x41, "Country code and national data" },
{ 0x42, "Issuer Identification Number (IIN)" },
{ 0x4f, "Application Dedicated File (ADF) Name" },
{ 0x50, "Application Label", EMV_TAG_STRING },
{ 0x51, "File reference data element" },
{ 0x52, "Command APDU" },
{ 0x53, "Discretionary data (or template)" },
{ 0x56, "Track 1 Data" },
{ 0x57, "Track 2 Equivalent Data" },
{ 0x5a, "Application Primary Account Number (PAN)" },
{ 0x5f20, "Cardholder Name", EMV_TAG_STRING },
{ 0x5f24, "Application Expiration Date", EMV_TAG_YYMMDD },
{ 0x5f25, "Application Effective Date", EMV_TAG_YYMMDD },
{ 0x5f28, "Issuer Country Code", EMV_TAG_NUMERIC },
{ 0x5f2a, "Transaction Currency Code", EMV_TAG_NUMERIC },
{ 0x5f2d, "Language Preference", EMV_TAG_STRING },
{ 0x5f30, "Service Code", EMV_TAG_NUMERIC },
{ 0x5f34, "Application Primary Account Number (PAN) Sequence Number", EMV_TAG_NUMERIC },
{ 0x5f36, "Transaction Currency Exponent", EMV_TAG_NUMERIC },
{ 0x5f50, "Issuer URL", EMV_TAG_STRING },
{ 0x5f53, "International Bank Account Number (IBAN)" },
{ 0x5f54, "Bank Identifier Code (BIC)" },
{ 0x5f55, "Issuer Country Code (alpha2 format)", EMV_TAG_STRING },
{ 0x5f56, "Issuer Country Code (alpha3 format)", EMV_TAG_STRING },
{ 0x41, "Country code and national data", EMV_TAG_GENERIC, NULL },
{ 0x42, "Issuer Identification Number (IIN)", EMV_TAG_GENERIC, NULL },
{ 0x4f, "Application Dedicated File (ADF) Name", EMV_TAG_GENERIC, NULL },
{ 0x50, "Application Label", EMV_TAG_STRING, NULL },
{ 0x51, "File reference data element", EMV_TAG_GENERIC, NULL },
{ 0x52, "Command APDU", EMV_TAG_GENERIC, NULL },
{ 0x53, "Discretionary data (or template)", EMV_TAG_GENERIC, NULL },
{ 0x56, "Track 1 Data", EMV_TAG_GENERIC, NULL },
{ 0x57, "Track 2 Equivalent Data", EMV_TAG_GENERIC, NULL },
{ 0x5a, "Application Primary Account Number (PAN)", EMV_TAG_GENERIC, NULL },
{ 0x5f20, "Cardholder Name", EMV_TAG_STRING, NULL },
{ 0x5f24, "Application Expiration Date", EMV_TAG_YYMMDD, NULL },
{ 0x5f25, "Application Effective Date", EMV_TAG_YYMMDD, NULL },
{ 0x5f28, "Issuer Country Code", EMV_TAG_NUMERIC, NULL },
{ 0x5f2a, "Transaction Currency Code", EMV_TAG_NUMERIC, NULL },
{ 0x5f2d, "Language Preference", EMV_TAG_STRING, NULL },
{ 0x5f30, "Service Code", EMV_TAG_NUMERIC, NULL },
{ 0x5f34, "Application Primary Account Number (PAN) Sequence Number", EMV_TAG_NUMERIC, NULL },
{ 0x5f36, "Transaction Currency Exponent", EMV_TAG_NUMERIC, NULL },
{ 0x5f50, "Issuer URL", EMV_TAG_STRING, NULL },
{ 0x5f53, "International Bank Account Number (IBAN)", EMV_TAG_GENERIC, NULL },
{ 0x5f54, "Bank Identifier Code (BIC)", EMV_TAG_GENERIC, NULL },
{ 0x5f55, "Issuer Country Code (alpha2 format)", EMV_TAG_STRING, NULL },
{ 0x5f56, "Issuer Country Code (alpha3 format)", EMV_TAG_STRING, NULL },
{ 0x61, "Application Template" },
{ 0x6f, "File Control Information (FCI) Template" },
{ 0x70, "READ RECORD Response Message Template" },
{ 0x71, "Issues Script Template 1" },
{ 0x72, "Issues Script Template 2" },
{ 0x73, "Directory Discretionary Template" },
{ 0x77, "Response Message Template Format 2" },
{ 0x80, "Response Message Template Format 1" },
{ 0x81, "Amount, Authorised (Binary)" },
{ 0x82, "Application Interchange Profile", EMV_TAG_BITMASK, &EMV_AIP },
{ 0x83, "Command Template" },
{ 0x84, "Dedicated File (DF) Name" },
{ 0x86, "Issuer Script Command" },
{ 0x87, "Application Priority Indicator" },
{ 0x88, "Short File Identifier (SFI)" },
{ 0x89, "Authorisation Code" },
{ 0x8a, "Authorisation Response Code" },
{ 0x8c, "Card Risk Management Data Object List 1 (CDOL1)", EMV_TAG_DOL },
{ 0x8d, "Card Risk Management Data Object List 2 (CDOL2)", EMV_TAG_DOL },
{ 0x8e, "Cardholder Verification Method (CVM) List", EMV_TAG_CVM_LIST },
{ 0x8f, "Certification Authority Public Key Index" },
{ 0x90, "Issuer Public Key Certificate" },
{ 0x91, "Issuer Authentication Data" },
{ 0x92, "Issuer Public Key Remainder" },
{ 0x93, "Signed Static Application Data" },
{ 0x94, "Application File Locator (AFL)", EMV_TAG_AFL },
{ 0x95, "Terminal Verification Results" },
{ 0x97, "Transaction Certificate Data Object List (TDOL)" },
{ 0x98, "Transaction Certificate (TC) Hash Value" },
{ 0x99, "Transaction Personal Identification Number (PIN) Data" },
{ 0x9a, "Transaction Date", EMV_TAG_YYMMDD },
{ 0x9b, "Transaction Status Information" },
{ 0x9c, "Transaction Type", EMV_TAG_NUMERIC },
{ 0x9d, "Directory Definition File (DDF) Name" },
{ 0x61, "Application Template", EMV_TAG_GENERIC, NULL },
{ 0x6f, "File Control Information (FCI) Template", EMV_TAG_GENERIC, NULL },
{ 0x70, "READ RECORD Response Message Template", EMV_TAG_GENERIC, NULL },
{ 0x71, "Issues Script Template 1", EMV_TAG_GENERIC, NULL },
{ 0x72, "Issues Script Template 2", EMV_TAG_GENERIC, NULL },
{ 0x73, "Directory Discretionary Template", EMV_TAG_GENERIC, NULL },
{ 0x77, "Response Message Template Format 2", EMV_TAG_GENERIC, NULL },
{ 0x80, "Response Message Template Format 1", EMV_TAG_GENERIC, NULL },
{ 0x81, "Amount, Authorised (Binary)", EMV_TAG_GENERIC, NULL },
{ 0x82, "Application Interchange Profile", EMV_TAG_BITMASK, &EMV_AIP },
{ 0x83, "Command Template", EMV_TAG_GENERIC, NULL },
{ 0x84, "Dedicated File (DF) Name", EMV_TAG_GENERIC, NULL },
{ 0x86, "Issuer Script Command", EMV_TAG_GENERIC, NULL },
{ 0x87, "Application Priority Indicator", EMV_TAG_GENERIC, NULL },
{ 0x88, "Short File Identifier (SFI)", EMV_TAG_GENERIC, NULL },
{ 0x89, "Authorisation Code", EMV_TAG_GENERIC, NULL },
{ 0x8a, "Authorisation Response Code", EMV_TAG_GENERIC, NULL },
{ 0x8c, "Card Risk Management Data Object List 1 (CDOL1)", EMV_TAG_DOL, NULL },
{ 0x8d, "Card Risk Management Data Object List 2 (CDOL2)", EMV_TAG_DOL, NULL },
{ 0x8e, "Cardholder Verification Method (CVM) List", EMV_TAG_CVM_LIST, NULL },
{ 0x8f, "Certification Authority Public Key Index", EMV_TAG_GENERIC, NULL },
{ 0x90, "Issuer Public Key Certificate", EMV_TAG_GENERIC, NULL },
{ 0x91, "Issuer Authentication Data", EMV_TAG_GENERIC, NULL },
{ 0x92, "Issuer Public Key Remainder", EMV_TAG_GENERIC, NULL },
{ 0x93, "Signed Static Application Data", EMV_TAG_GENERIC, NULL },
{ 0x94, "Application File Locator (AFL)", EMV_TAG_AFL, NULL },
{ 0x95, "Terminal Verification Results", EMV_TAG_GENERIC, NULL },
{ 0x97, "Transaction Certificate Data Object List (TDOL)", EMV_TAG_GENERIC, NULL },
{ 0x98, "Transaction Certificate (TC) Hash Value", EMV_TAG_GENERIC, NULL },
{ 0x99, "Transaction Personal Identification Number (PIN) Data", EMV_TAG_GENERIC, NULL },
{ 0x9a, "Transaction Date", EMV_TAG_YYMMDD, NULL },
{ 0x9b, "Transaction Status Information", EMV_TAG_GENERIC, NULL },
{ 0x9c, "Transaction Type", EMV_TAG_NUMERIC, NULL },
{ 0x9d, "Directory Definition File (DDF) Name", EMV_TAG_GENERIC, NULL },
{ 0x9f01, "Acquirer Identifier", EMV_TAG_NUMERIC },
{ 0x9f02, "Amount, Authorised (Numeric)", EMV_TAG_NUMERIC },
{ 0x9f03, "Amount, Other (Numeric)", EMV_TAG_NUMERIC },
{ 0x9f04, "Amount, Other (Binary)", EMV_TAG_NUMERIC },
{ 0x9f05, "Application Discretionary Data" },
{ 0x9f06, "Application Identifier (AID), Terminal. ISO 7816-5" },
{ 0x9f07, "Application Usage Control", EMV_TAG_BITMASK, &EMV_AUC },
{ 0x9f08, "Application Version Number" },
{ 0x9f09, "Application Version Number - terminal" },
{ 0x9f0a, "Application Selection Registered Proprietary Data" }, // https://blog.ul-ts.com/posts/electronic-card-identifier-one-more-step-for-mif-compliance/
{ 0x9f0b, "Cardholder Name Extended", EMV_TAG_STRING },
{ 0x9f0d, "Issuer Action Code - Default", EMV_TAG_BITMASK, &EMV_TVR },
{ 0x9f0e, "Issuer Action Code - Denial", EMV_TAG_BITMASK, &EMV_TVR },
{ 0x9f0f, "Issuer Action Code - Online", EMV_TAG_BITMASK, &EMV_TVR },
{ 0x9f10, "Issuer Application Data" },
{ 0x9f11, "Issuer Code Table Index", EMV_TAG_NUMERIC },
{ 0x9f12, "Application Preferred Name", EMV_TAG_STRING },
{ 0x9f13, "Last Online Application Transaction Counter (ATC) Register" },
{ 0x9f14, "Lower Consecutive Offline Limit" },
{ 0x9f15, "Merchant Category Code", EMV_TAG_NUMERIC },
{ 0x9f16, "Merchant Identifier", EMV_TAG_STRING },
{ 0x9f17, "Personal Identification Number (PIN) Try Counter" },
{ 0x9f18, "Issuer Script Identifier" },
{ 0x9f1a, "Terminal Country Code" },
{ 0x9f1b, "Terminal Floor Limit" },
{ 0x9f1c, "Terminal Identification", EMV_TAG_STRING },
{ 0x9f1d, "Terminal Risk Management Data" },
{ 0x9f1e, "Interface Device (IFD) Serial Number", EMV_TAG_STRING },
{ 0x9f1f, "Track 1 Discretionary Data", EMV_TAG_STRING },
{ 0x9f20, "Track 2 Discretionary Data", EMV_TAG_STRING },
{ 0x9f21, "Transaction Time" },
{ 0x9f22, "Certification Authority Public Key Index - Terminal" },
{ 0x9f23, "Upper Consecutive Offline Limit" },
{ 0x9f26, "Application Cryptogram" },
{ 0x9f27, "Cryptogram Information Data", EMV_TAG_CID },
{ 0x9f2a, "Kernel Identifier" },
{ 0x9f2d, "ICC PIN Encipherment Public Key Certificate" },
{ 0x9f2e, "ICC PIN Encipherment Public Key Exponent" },
{ 0x9f2f, "ICC PIN Encipherment Public Key Remainder" },
{ 0x9f32, "Issuer Public Key Exponent" },
{ 0x9f33, "Terminal Capabilities" },
{ 0x9f34, "Cardholder Verification Method (CVM) Results" },
{ 0x9f35, "Terminal Type" },
{ 0x9f36, "Application Transaction Counter (ATC)" },
{ 0x9f37, "Unpredictable Number" },
{ 0x9f38, "Processing Options Data Object List (PDOL)", EMV_TAG_DOL },
{ 0x9f39, "Point-of-Service (POS) Entry Mode", EMV_TAG_NUMERIC },
{ 0x9f3a, "Amount, Reference Currency" },
{ 0x9f3b, "Application Reference Currency", EMV_TAG_NUMERIC },
{ 0x9f3c, "Transaction Reference Currency Code", EMV_TAG_NUMERIC },
{ 0x9f3d, "Transaction Reference Currency Exponent", EMV_TAG_NUMERIC },
{ 0x9f40, "Additional Terminal Capabilities" },
{ 0x9f41, "Transaction Sequence Counter", EMV_TAG_NUMERIC },
{ 0x9f42, "Application Currency Code", EMV_TAG_NUMERIC },
{ 0x9f43, "Application Reference Currency Exponent", EMV_TAG_NUMERIC },
{ 0x9f44, "Application Currency Exponent", EMV_TAG_NUMERIC },
{ 0x9f45, "Data Authentication Code" },
{ 0x9f46, "ICC Public Key Certificate" },
{ 0x9f47, "ICC Public Key Exponent" },
{ 0x9f48, "ICC Public Key Remainder" },
{ 0x9f49, "Dynamic Data Authentication Data Object List (DDOL)", EMV_TAG_DOL },
{ 0x9f4a, "Static Data Authentication Tag List" },
{ 0x9f4b, "Signed Dynamic Application Data" },
{ 0x9f4c, "ICC Dynamic Number" },
{ 0x9f4d, "Log Entry" },
{ 0x9f4e, "Merchant Name and Location", EMV_TAG_STRING },
{ 0x9f4f, "Log Format", EMV_TAG_DOL },
{ 0x9f01, "Acquirer Identifier", EMV_TAG_NUMERIC, NULL },
{ 0x9f02, "Amount, Authorised (Numeric)", EMV_TAG_NUMERIC, NULL },
{ 0x9f03, "Amount, Other (Numeric)", EMV_TAG_NUMERIC, NULL },
{ 0x9f04, "Amount, Other (Binary)", EMV_TAG_NUMERIC, NULL },
{ 0x9f05, "Application Discretionary Data", EMV_TAG_GENERIC, NULL },
{ 0x9f07, "Application Usage Control", EMV_TAG_BITMASK, &EMV_AUC },
{ 0x9f08, "Application Version Number", EMV_TAG_GENERIC, NULL },
{ 0x9f09, "Application Version Number - terminal", EMV_TAG_GENERIC, NULL },
{ 0x9f0a, "Application Selection Registered Proprietary Data", EMV_TAG_GENERIC, NULL }, // https://blog.ul-ts.com/posts/electronic-card-identifier-one-more-step-for-mif-compliance/
{ 0x9f0b, "Cardholder Name Extended", EMV_TAG_STRING, NULL },
{ 0x9f0d, "Issuer Action Code - Default", EMV_TAG_BITMASK, &EMV_TVR },
{ 0x9f0e, "Issuer Action Code - Denial", EMV_TAG_BITMASK, &EMV_TVR },
{ 0x9f0f, "Issuer Action Code - Online", EMV_TAG_BITMASK, &EMV_TVR },
{ 0x9f10, "Issuer Application Data", EMV_TAG_GENERIC, NULL },
{ 0x9f11, "Issuer Code Table Index", EMV_TAG_NUMERIC, NULL },
{ 0x9f12, "Application Preferred Name", EMV_TAG_STRING, NULL },
{ 0x9f13, "Last Online Application Transaction Counter (ATC) Register", EMV_TAG_GENERIC, NULL },
{ 0x9f14, "Lower Consecutive Offline Limit", EMV_TAG_GENERIC, NULL },
{ 0x9f15, "Merchant Category Code", EMV_TAG_NUMERIC, NULL },
{ 0x9f16, "Merchant Identifier", EMV_TAG_STRING, NULL },
{ 0x9f17, "Personal Identification Number (PIN) Try Counter", EMV_TAG_GENERIC, NULL },
{ 0x9f18, "Issuer Script Identifier", EMV_TAG_GENERIC, NULL },
{ 0x9f1a, "Terminal Country Code", EMV_TAG_GENERIC, NULL },
{ 0x9f1b, "Terminal Floor Limit", EMV_TAG_GENERIC, NULL },
{ 0x9f1c, "Terminal Identification", EMV_TAG_STRING, NULL },
{ 0x9f1d, "Terminal Risk Management Data", EMV_TAG_GENERIC, NULL },
{ 0x9f1e, "Interface Device (IFD) Serial Number", EMV_TAG_STRING, NULL },
{ 0x9f1f, "Track 1 Discretionary Data", EMV_TAG_STRING, NULL },
{ 0x9f20, "Track 2 Discretionary Data", EMV_TAG_STRING, NULL },
{ 0x9f21, "Transaction Time", EMV_TAG_GENERIC, NULL },
{ 0x9f22, "Certification Authority Public Key Index - Terminal", EMV_TAG_GENERIC, NULL },
{ 0x9f23, "Upper Consecutive Offline Limit", EMV_TAG_GENERIC, NULL },
{ 0x9f26, "Application Cryptogram", EMV_TAG_GENERIC, NULL },
{ 0x9f27, "Cryptogram Information Data", EMV_TAG_CID, NULL },
{ 0x9f2a, "Kernel Identifier", EMV_TAG_GENERIC, NULL },
{ 0x9f2d, "ICC PIN Encipherment Public Key Certificate", EMV_TAG_GENERIC, NULL },
{ 0x9f2e, "ICC PIN Encipherment Public Key Exponent", EMV_TAG_GENERIC, NULL },
{ 0x9f2f, "ICC PIN Encipherment Public Key Remainder", EMV_TAG_GENERIC, NULL },
{ 0x9f32, "Issuer Public Key Exponent", EMV_TAG_GENERIC, NULL },
{ 0x9f33, "Terminal Capabilities", EMV_TAG_GENERIC, NULL },
{ 0x9f34, "Cardholder Verification Method (CVM) Results", EMV_TAG_GENERIC, NULL },
{ 0x9f35, "Terminal Type", EMV_TAG_GENERIC, NULL },
{ 0x9f36, "Application Transaction Counter (ATC)", EMV_TAG_GENERIC, NULL },
{ 0x9f37, "Unpredictable Number", EMV_TAG_GENERIC, NULL },
{ 0x9f38, "Processing Options Data Object List (PDOL)", EMV_TAG_DOL, NULL },
{ 0x9f39, "Point-of-Service (POS) Entry Mode", EMV_TAG_NUMERIC, NULL },
{ 0x9f3a, "Amount, Reference Currency", EMV_TAG_GENERIC, NULL },
{ 0x9f3b, "Application Reference Currency", EMV_TAG_NUMERIC, NULL },
{ 0x9f3c, "Transaction Reference Currency Code", EMV_TAG_NUMERIC, NULL },
{ 0x9f3d, "Transaction Reference Currency Exponent", EMV_TAG_NUMERIC, NULL },
{ 0x9f40, "Additional Terminal Capabilities", EMV_TAG_GENERIC, NULL },
{ 0x9f41, "Transaction Sequence Counter", EMV_TAG_NUMERIC, NULL },
{ 0x9f42, "Application Currency Code", EMV_TAG_NUMERIC, NULL },
{ 0x9f43, "Application Reference Currency Exponent", EMV_TAG_NUMERIC, NULL },
{ 0x9f44, "Application Currency Exponent", EMV_TAG_NUMERIC, NULL },
{ 0x9f45, "Data Authentication Code", EMV_TAG_GENERIC, NULL },
{ 0x9f46, "ICC Public Key Certificate", EMV_TAG_GENERIC, NULL },
{ 0x9f47, "ICC Public Key Exponent", EMV_TAG_GENERIC, NULL },
{ 0x9f48, "ICC Public Key Remainder", EMV_TAG_GENERIC, NULL },
{ 0x9f49, "Dynamic Data Authentication Data Object List (DDOL)", EMV_TAG_DOL, NULL },
{ 0x9f4a, "Static Data Authentication Tag List", EMV_TAG_GENERIC, NULL },
{ 0x9f4b, "Signed Dynamic Application Data", EMV_TAG_GENERIC, NULL },
{ 0x9f4c, "ICC Dynamic Number", EMV_TAG_GENERIC, NULL },
{ 0x9f4d, "Log Entry", EMV_TAG_GENERIC, NULL },
{ 0x9f4e, "Merchant Name and Location", EMV_TAG_STRING, NULL },
{ 0x9f4f, "Log Format", EMV_TAG_DOL, NULL },
{ 0x9f50, "Offline Accumulator Balance" },
{ 0x9f51, "Application Currency Code" },
{ 0x9f51, "DRDOL" },
{ 0x9f50, "Offline Accumulator Balance", EMV_TAG_GENERIC, NULL },
{ 0x9f51, "Application Currency Code", EMV_TAG_GENERIC, NULL },
{ 0x9f51, "DRDOL", EMV_TAG_GENERIC, NULL },
{ 0x9f52, "Application Default Action (ADA)" },
{ 0x9f52, "Terminal Compatibility Indicator" },
{ 0x9f52, "Application Default Action (ADA)", EMV_TAG_GENERIC, NULL },
{ 0x9f52, "Terminal Compatibility Indicator", EMV_TAG_GENERIC, NULL },
{ 0x9f53, "Transaction Category Code" },
{ 0x9f54, "DS ODS Card" },
{ 0x9f53, "Transaction Category Code", EMV_TAG_GENERIC, NULL },
{ 0x9f54, "DS ODS Card", EMV_TAG_GENERIC, NULL },
{ 0x9f55, "Mobile Support Indicator" },
{ 0x9f55, "Issuer Authentication Flags" },
{ 0x9f55, "Mobile Support Indicator", EMV_TAG_GENERIC, NULL },
{ 0x9f55, "Issuer Authentication Flags", EMV_TAG_GENERIC, NULL },
{ 0x9f56, "Issuer Authentication Indicator" },
{ 0x9f57, "Issuer Country Code" },
{ 0x9f58, "Consecutive Transaction Counter Limit (CTCL)" },
{ 0x9f59, "Consecutive Transaction Counter Upper Limit (CTCUL)" },
{ 0x9f5A, "Application Program Identifier" },
{ 0x9f5b, "Issuer Script Results" },
{ 0x9f5c, "Cumulative Total Transaction Amount Upper Limit (CTTAUL)" },
{ 0x9f5d, "Application Capabilities Information" },
{ 0x9f5e, "Data Storage Identifier" },
{ 0x9f5f, "DS Slot Availability" },
{ 0x9f56, "Issuer Authentication Indicator", EMV_TAG_GENERIC, NULL },
{ 0x9f57, "Issuer Country Code", EMV_TAG_GENERIC, NULL },
{ 0x9f58, "Consecutive Transaction Counter Limit (CTCL)", EMV_TAG_GENERIC, NULL },
{ 0x9f59, "Consecutive Transaction Counter Upper Limit (CTCUL)", EMV_TAG_GENERIC, NULL },
{ 0x9f5A, "Application Program Identifier", EMV_TAG_GENERIC, NULL },
{ 0x9f5b, "Issuer Script Results", EMV_TAG_GENERIC, NULL },
{ 0x9f5c, "Cumulative Total Transaction Amount Upper Limit (CTTAUL)", EMV_TAG_GENERIC, NULL },
{ 0x9f5d, "Application Capabilities Information", EMV_TAG_GENERIC, NULL },
{ 0x9f5e, "Data Storage Identifier", EMV_TAG_GENERIC, NULL },
{ 0x9f5f, "DS Slot Availability", EMV_TAG_GENERIC, NULL },
{ 0x9f60, "CVC3 (Track1)" },
{ 0x9f61, "CVC3 (Track2)" },
{ 0x9f62, "PCVC3 (Track1)" },
{ 0x9f63, "PUNATC (Track1)" },
{ 0x9f64, "NATC (Track1)" },
{ 0x9f65, "PCVC3 (Track2)" },
{ 0x9f66, "PUNATC (Track2) / Terminal Transaction Qualifiers (TTQ)", EMV_TAG_BITMASK, &EMV_TTQ },
{ 0x9f67, "NATC (Track2) / MSD Offset" },
{ 0x9f68, "Cardholder verification method list (PayPass)" },
{ 0x9f69, "Card Authentication Related Data (UDOL)" },
{ 0x9f6a, "Unpredictable Number", EMV_TAG_NUMERIC },
{ 0x9f6b, "Track 2 Data" },
{ 0x9f6c, "Card Transaction Qualifiers (CTQ)", EMV_TAG_BITMASK, &EMV_CTQ },
{ 0x9f6d, "Mag-stripe Application Version Number (Reader)" },
{ 0x9f6e, "Form Factor Indicator" },
{ 0x9f6f, "DS Slot Management Control" },
{ 0x9f60, "CVC3 (Track1)", EMV_TAG_GENERIC, NULL },
{ 0x9f61, "CVC3 (Track2)", EMV_TAG_GENERIC, NULL },
{ 0x9f62, "PCVC3 (Track1)", EMV_TAG_GENERIC, NULL },
{ 0x9f63, "PUNATC (Track1)", EMV_TAG_GENERIC, NULL },
{ 0x9f64, "NATC (Track1)", EMV_TAG_GENERIC, NULL },
{ 0x9f65, "PCVC3 (Track2)", EMV_TAG_GENERIC, NULL },
{ 0x9f66, "PUNATC (Track2) / Terminal Transaction Qualifiers (TTQ)", EMV_TAG_BITMASK, &EMV_TTQ },
{ 0x9f67, "NATC (Track2) / MSD Offset", EMV_TAG_GENERIC, NULL },
{ 0x9f68, "Cardholder verification method list (PayPass)", EMV_TAG_GENERIC, NULL },
{ 0x9f69, "Card Authentication Related Data (UDOL)", EMV_TAG_GENERIC, NULL },
{ 0x9f6a, "Unpredictable Number", EMV_TAG_NUMERIC, NULL },
{ 0x9f6b, "Track 2 Data", EMV_TAG_GENERIC, NULL },
{ 0x9f6c, "Card Transaction Qualifiers (CTQ)", EMV_TAG_BITMASK, &EMV_CTQ },
{ 0x9f6d, "Mag-stripe Application Version Number (Reader)", EMV_TAG_GENERIC, NULL },
{ 0x9f6e, "Form Factor Indicator", EMV_TAG_GENERIC, NULL },
{ 0x9f6f, "DS Slot Management Control", EMV_TAG_GENERIC, NULL },
{ 0x9f70, "Protected Data Envelope 1" },
{ 0x9f71, "Protected Data Envelope 2" },
{ 0x9f72, "Protected Data Envelope 3" },
{ 0x9f73, "Protected Data Envelope 4" },
{ 0x9f74, "Protected Data Envelope 5" },
{ 0x9f75, "Unprotected Data Envelope 1" },
{ 0x9f76, "Unprotected Data Envelope 2" },
{ 0x9f77, "Unprotected Data Envelope 3" },
{ 0x9f78, "Unprotected Data Envelope 4" },
{ 0x9f79, "Unprotected Data Envelope 5" },
{ 0x9f7c, "Merchant Custom Data / Customer Exclusive Data (CED)" },
{ 0x9f7d, "DS Summary 1" },
{ 0x9f7f, "DS Unpredictable Number" },
{ 0x9f70, "Protected Data Envelope 1", EMV_TAG_GENERIC, NULL },
{ 0x9f71, "Protected Data Envelope 2", EMV_TAG_GENERIC, NULL },
{ 0x9f72, "Protected Data Envelope 3", EMV_TAG_GENERIC, NULL },
{ 0x9f73, "Protected Data Envelope 4", EMV_TAG_GENERIC, NULL },
{ 0x9f74, "Protected Data Envelope 5", EMV_TAG_GENERIC, NULL },
{ 0x9f75, "Unprotected Data Envelope 1", EMV_TAG_GENERIC, NULL },
{ 0x9f76, "Unprotected Data Envelope 2", EMV_TAG_GENERIC, NULL },
{ 0x9f77, "Unprotected Data Envelope 3", EMV_TAG_GENERIC, NULL },
{ 0x9f78, "Unprotected Data Envelope 4", EMV_TAG_GENERIC, NULL },
{ 0x9f79, "Unprotected Data Envelope 5", EMV_TAG_GENERIC, NULL },
{ 0x9f7c, "Merchant Custom Data / Customer Exclusive Data (CED)", EMV_TAG_GENERIC, NULL },
{ 0x9f7d, "DS Summary 1", EMV_TAG_GENERIC, NULL },
{ 0x9f7f, "DS Unpredictable Number", EMV_TAG_GENERIC, NULL },
{ 0xa5, "File Control Information (FCI) Proprietary Template" },
{ 0xbf0c, "File Control Information (FCI) Issuer Discretionary Data" },
{ 0xdf20, "Issuer Proprietary Bitmap (IPB)" },
{ 0xdf4b, "POS Cardholder Interaction Information" },
{ 0xdf60, "VISA Log Entry" },
{ 0xdf61, "DS Digest H" },
{ 0xdf62, "DS ODS Info" },
{ 0xdf63, "DS ODS Term" },
{ 0xa5, "File Control Information (FCI) Proprietary Template", EMV_TAG_GENERIC, NULL },
{ 0xbf0c, "File Control Information (FCI) Issuer Discretionary Data", EMV_TAG_GENERIC, NULL },
{ 0xdf20, "Issuer Proprietary Bitmap (IPB)", EMV_TAG_GENERIC, NULL },
{ 0xdf4b, "POS Cardholder Interaction Information", EMV_TAG_GENERIC, NULL },
{ 0xdf60, "VISA Log Entry", EMV_TAG_GENERIC, NULL },
{ 0xdf61, "DS Digest H", EMV_TAG_GENERIC, NULL },
{ 0xdf62, "DS ODS Info", EMV_TAG_GENERIC, NULL },
{ 0xdf63, "DS ODS Term", EMV_TAG_GENERIC, NULL },
{ 0xdf8104, "Balance Read Before Gen AC" },
{ 0xdf8105, "Balance Read After Gen AC" },
{ 0xdf8106, "Data Needed" },
{ 0xdf8107, "CDOL1 Related Data" },
{ 0xdf8108, "DS AC Type" },
{ 0xdf8109, "DS Input (Term)" },
{ 0xdf810a, "DS ODS Info For Reader" },
{ 0xdf810b, "DS Summary Status" },
{ 0xdf810c, "Kernel ID" },
{ 0xdf810d, "DSVN Term" },
{ 0xdf810e, "Post-Gen AC Put Data Status" },
{ 0xdf810f, "Pre-Gen AC Put Data Status" },
{ 0xdf8110, "Proceed To First Write Flag" },
{ 0xdf8111, "PDOL Related Data" },
{ 0xdf8112, "Tags To Read" },
{ 0xdf8113, "DRDOL Related Data" },
{ 0xdf8114, "Reference Control Parameter" },
{ 0xdf8115, "Error Indication" },
{ 0xdf8116, "User Interface Request Data" },
{ 0xdf8117, "Card Data Input Capability" },
{ 0xdf8118, "CVM Capability - CVM Required" },
{ 0xdf8119, "CVM Capability - No CVM Required" },
{ 0xdf811a, "Default UDOL" },
{ 0xdf811b, "Kernel Configuration" },
{ 0xdf811c, "Max Lifetime of Torn Transaction Log Record" },
{ 0xdf811d, "Max Number of Torn Transaction Log Records" },
{ 0xdf811e, "Mag-stripe CVM Capability CVM Required" },
{ 0xdf811f, "Security Capability" },
{ 0xdf8120, "Terminal Action Code Default" },
{ 0xdf8121, "Terminal Action Code Denial" },
{ 0xdf8122, "Terminal Action Code Online" },
{ 0xdf8123, "Reader Contactless Floor Limit" },
{ 0xdf8124, "Reader Contactless Transaction Limit (No On-device CVM)" },
{ 0xdf8125, "Reader Contactless Transaction Limit (On-device CVM)" },
{ 0xdf8126, "Reader CVM Required Limit" },
{ 0xdf8127, "TIME_OUT_VALUE" },
{ 0xdf8128, "IDS Status" },
{ 0xdf8129, "Outcome Parameter Set" },
{ 0xdf812a, "DD Card (Track1)" },
{ 0xdf812b, "DD Card (Track2)" },
{ 0xdf812c, "Mag-stripe CVM Capability No CVM Required" },
{ 0xdf812d, "Message Hold Time" },
{ 0xdf8104, "Balance Read Before Gen AC", EMV_TAG_GENERIC, NULL },
{ 0xdf8105, "Balance Read After Gen AC", EMV_TAG_GENERIC, NULL },
{ 0xdf8106, "Data Needed", EMV_TAG_GENERIC, NULL },
{ 0xdf8107, "CDOL1 Related Data", EMV_TAG_GENERIC, NULL },
{ 0xdf8108, "DS AC Type", EMV_TAG_GENERIC, NULL },
{ 0xdf8109, "DS Input (Term)", EMV_TAG_GENERIC, NULL },
{ 0xdf810a, "DS ODS Info For Reader", EMV_TAG_GENERIC, NULL },
{ 0xdf810b, "DS Summary Status", EMV_TAG_GENERIC, NULL },
{ 0xdf810c, "Kernel ID", EMV_TAG_GENERIC, NULL },
{ 0xdf810d, "DSVN Term", EMV_TAG_GENERIC, NULL },
{ 0xdf810e, "Post-Gen AC Put Data Status", EMV_TAG_GENERIC, NULL },
{ 0xdf810f, "Pre-Gen AC Put Data Status", EMV_TAG_GENERIC, NULL },
{ 0xdf8110, "Proceed To First Write Flag", EMV_TAG_GENERIC, NULL },
{ 0xdf8111, "PDOL Related Data", EMV_TAG_GENERIC, NULL },
{ 0xdf8112, "Tags To Read", EMV_TAG_GENERIC, NULL },
{ 0xdf8113, "DRDOL Related Data", EMV_TAG_GENERIC, NULL },
{ 0xdf8114, "Reference Control Parameter", EMV_TAG_GENERIC, NULL },
{ 0xdf8115, "Error Indication", EMV_TAG_GENERIC, NULL },
{ 0xdf8116, "User Interface Request Data", EMV_TAG_GENERIC, NULL },
{ 0xdf8117, "Card Data Input Capability", EMV_TAG_GENERIC, NULL },
{ 0xdf8118, "CVM Capability - CVM Required", EMV_TAG_GENERIC, NULL },
{ 0xdf8119, "CVM Capability - No CVM Required", EMV_TAG_GENERIC, NULL },
{ 0xdf811a, "Default UDOL", EMV_TAG_GENERIC, NULL },
{ 0xdf811b, "Kernel Configuration", EMV_TAG_GENERIC, NULL },
{ 0xdf811c, "Max Lifetime of Torn Transaction Log Record", EMV_TAG_GENERIC, NULL },
{ 0xdf811d, "Max Number of Torn Transaction Log Records", EMV_TAG_GENERIC, NULL },
{ 0xdf811e, "Mag-stripe CVM Capability CVM Required", EMV_TAG_GENERIC, NULL },
{ 0xdf811f, "Security Capability", EMV_TAG_GENERIC, NULL },
{ 0xdf8120, "Terminal Action Code Default", EMV_TAG_GENERIC, NULL },
{ 0xdf8121, "Terminal Action Code Denial", EMV_TAG_GENERIC, NULL },
{ 0xdf8122, "Terminal Action Code Online", EMV_TAG_GENERIC, NULL },
{ 0xdf8123, "Reader Contactless Floor Limit", EMV_TAG_GENERIC, NULL },
{ 0xdf8124, "Reader Contactless Transaction Limit (No On-device CVM)", EMV_TAG_GENERIC, NULL },
{ 0xdf8125, "Reader Contactless Transaction Limit (On-device CVM)", EMV_TAG_GENERIC, NULL },
{ 0xdf8126, "Reader CVM Required Limit", EMV_TAG_GENERIC, NULL },
{ 0xdf8127, "TIME_OUT_VALUE", EMV_TAG_GENERIC, NULL },
{ 0xdf8128, "IDS Status", EMV_TAG_GENERIC, NULL },
{ 0xdf8129, "Outcome Parameter Set", EMV_TAG_GENERIC, NULL },
{ 0xdf812a, "DD Card (Track1)", EMV_TAG_GENERIC, NULL },
{ 0xdf812b, "DD Card (Track2)", EMV_TAG_GENERIC, NULL },
{ 0xdf812c, "Mag-stripe CVM Capability No CVM Required", EMV_TAG_GENERIC, NULL },
{ 0xdf812d, "Message Hold Time", EMV_TAG_GENERIC, NULL },
{ 0xff8101, "Torn Record" },
{ 0xff8102, "Tags To Write Before Gen AC" },
{ 0xff8103, "Tags To Write After Gen AC" },
{ 0xff8104, "Data To Send" },
{ 0xff8105, "Data Record" },
{ 0xff8106, "Discretionary Data" },
{ 0xff8101, "Torn Record", EMV_TAG_GENERIC, NULL },
{ 0xff8102, "Tags To Write Before Gen AC", EMV_TAG_GENERIC, NULL },
{ 0xff8103, "Tags To Write After Gen AC", EMV_TAG_GENERIC, NULL },
{ 0xff8104, "Data To Send", EMV_TAG_GENERIC, NULL },
{ 0xff8105, "Data Record", EMV_TAG_GENERIC, NULL },
{ 0xff8106, "Discretionary Data", EMV_TAG_GENERIC, NULL },
};
static int emv_sort_tag(tlv_tag_t tag) {