]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/emv/emv_tags.c
Merge pull request #504 from merlokk/emv3
[proxmark3-svn] / client / emv / emv_tags.c
index 89626cee60dffb36cc66cff203365107dbb01ecf..25ad9658509e855f61f1e33c195c8b4f684c4e74 100644 (file)
@@ -222,6 +222,7 @@ static const struct emv_tag emv_tags[] = {
        { 0x9f06, "Application Identifier (AID), Terminal. ISO 7816-5" },
        { 0x9f07, "Application Usage Control", EMV_TAG_BITMASK, &EMV_AUC },
        { 0x9f08, "Application Version Number" },
+       { 0x9f0a, "Application Selection Registered Proprietary Data" }, // https://blog.ul-ts.com/posts/electronic-card-identifier-one-more-step-for-mif-compliance/
        { 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 },
@@ -482,20 +483,20 @@ static void emv_tag_dump_cid(const struct tlv *tlv, const struct emv_tag *tag, F
        }
        
        PRINT_INDENT(level);
-       if ((tlv->value[0] & 0xC0) == 0x00)     fprintf(f, "\tAC1: AAC (Transaction declined)\n");
-       if ((tlv->value[0] & 0xC0) == 0x40)     fprintf(f, "\tAC1: TC (Transaction approved)\n");
-       if ((tlv->value[0] & 0xC0) == 0x80)     fprintf(f, "\tAC1: ARQC (Online authorisation requested)\n");
-       if ((tlv->value[0] & 0xC0) == 0xC0)     fprintf(f, "\tAC1: RFU\n");
+       if ((tlv->value[0] & EMVAC_AC_MASK) == EMVAC_AAC)               fprintf(f, "\tAC1: AAC (Transaction declined)\n");
+       if ((tlv->value[0] & EMVAC_AC_MASK) == EMVAC_TC)                fprintf(f, "\tAC1: TC (Transaction approved)\n");
+       if ((tlv->value[0] & EMVAC_AC_MASK) == EMVAC_ARQC)              fprintf(f, "\tAC1: ARQC (Online authorisation requested)\n");
+       if ((tlv->value[0] & EMVAC_AC_MASK) == EMVAC_AC_MASK)   fprintf(f, "\tAC1: RFU\n");
 
-       if ((tlv->value[0] & 0x08) != 0x00) {
+       if (tlv->value[0] & EMVCID_ADVICE) {
                PRINT_INDENT(level);
                fprintf(f, "\tAdvice required!\n");
        }
 
-       if ((tlv->value[0] & 0x07) != 0x00) {
+       if (tlv->value[0] & EMVCID_REASON_MASK) {
                PRINT_INDENT(level);
                fprintf(f, "\tReason/advice/referral code: ");
-               switch((tlv->value[0] & 0x07)) {
+               switch((tlv->value[0] & EMVCID_REASON_MASK)) {
                        case 0:
                                fprintf(f, "No information given\n");
                                break;
@@ -509,7 +510,7 @@ static void emv_tag_dump_cid(const struct tlv *tlv, const struct emv_tag *tag, F
                                fprintf(f, "Issuer authentication failed\n");
                                break;
                        default:
-                               fprintf(f, "\tRFU: %2x\n", (tlv->value[0] & 0x07));
+                               fprintf(f, "\tRFU: %2x\n", (tlv->value[0] & EMVCID_REASON_MASK));
                                break;
                }
        }
Impressum, Datenschutz