mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-11 07:46:09 -07:00
optimization UDOL creation. does not affect on functionality.
This commit is contained in:
parent
44128a0e9a
commit
78528074b1
1 changed files with 2 additions and 13 deletions
|
@ -629,23 +629,12 @@ int CmdHFEMVExec(const char *cmd) {
|
||||||
PrintAndLog("ERROR: can't create UDOL TLV.");
|
PrintAndLog("ERROR: can't create UDOL TLV.");
|
||||||
return 4;
|
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
|
PrintAndLog("UDOL data[%d]: %s", udol_data_tlv->len, sprint_hex(udol_data_tlv->value, udol_data_tlv->len));
|
||||||
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("\n* Mastercard compute cryptographic checksum(UDOL)");
|
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) {
|
if (res) {
|
||||||
PrintAndLog("ERROR Compute Crypto Checksum. APDU error %4x", sw);
|
PrintAndLog("ERROR Compute Crypto Checksum. APDU error %4x", sw);
|
||||||
return 5;
|
return 5;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue