]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/emv/cmdemv.c
fix: AVX512 detection
[proxmark3-svn] / client / emv / cmdemv.c
index 679c26edeb321705d546c3078d0379d263ac86e1..b188555e3d0a350349d3ed9d12fb48fbf5931cad 100644 (file)
@@ -405,8 +405,8 @@ int CmdHFEMVExec(const char *cmd) {
        PrintAndLog("\n* Init transaction parameters.");
 
     //9F66:(Terminal Transaction Qualifiers (TTQ)) len:4
-//     TLV_ADD(0x9F66, "\x86\x00\x00\x00"); // MSD
-       TLV_ADD(0x9F66, "\x26\x00\x00\x00"); // qVSDC
+       TLV_ADD(0x9F66, "\x86\x00\x00\x00"); // MSD
+//     TLV_ADD(0x9F66, "\x26\x00\x00\x00"); // qVSDC
 //     TLV_ADD(0x9F66, "\x8e\x00\x00\x00"); // CDA
     //9F02:(Amount, Authorised (Numeric)) len:6
        TLV_ADD(0x9F02, "\x00\x00\x00\x00\x01\x00");
@@ -629,23 +629,12 @@ int CmdHFEMVExec(const char *cmd) {
                                        PrintAndLog("ERROR: can't create UDOL TLV.");
                                        return 4;
                                }
-                               
-                               size_t udol_data_tlv_data_len;
-                               unsigned char *udol_data_tlv_data = tlv_encode(udol_data_tlv, &udol_data_tlv_data_len);
-                               if (!udol_data_tlv_data) {
-                                       PrintAndLog("ERROR: can't create UDOL data.");
-                                       return 4;
-                               }
 
-                               // eliminate fake tag
-                               udol_data_tlv_data_len -= 2;
-                               udol_data_tlv_data += 2;
-                               
-                               PrintAndLog("UDOL data[%d]: %s", udol_data_tlv_data_len, sprint_hex(udol_data_tlv_data, udol_data_tlv_data_len));
+                               PrintAndLog("UDOL data[%d]: %s", udol_data_tlv->len, sprint_hex(udol_data_tlv->value, udol_data_tlv->len));
                                
                                PrintAndLog("\n* Mastercard compute cryptographic checksum(UDOL)");
                                
-                               res = MSCComputeCryptoChecksum(true, udol_data_tlv_data, udol_data_tlv_data_len, buf, sizeof(buf), &len, &sw, tlvRoot);
+                               res = MSCComputeCryptoChecksum(true, (uint8_t *)udol_data_tlv->value, udol_data_tlv->len, buf, sizeof(buf), &len, &sw, tlvRoot);
                                if (res) {
                                        PrintAndLog("ERROR Compute Crypto Checksum. APDU error %4x", sw);
                                        return 5;
Impressum, Datenschutz