iceman1001 committed 2017-11-10 23:24:05 +01:00
1 parent 25b173ea20
commit 02af3b9e1d
7 files changed
+47 -25

No files matched your search

+6 -4
View File
@@ -10,9 +10,11 @@
#include "emvcore.h"
static bool print_cb(void *data, const struct tlv *tlv) {
emv_tag_dump(tlv, stdout);
dump_buffer(tlv->value, tlv->len, stdout);
static bool print_cb(void *data, const struct tlv *tlv, int level, bool is_leaf) {
emv_tag_dump(tlv, stdout, level);
if (is_leaf) {
dump_buffer(tlv->value, tlv->len, stdout, level);
}
return true;
}
@@ -23,7 +25,7 @@ void TLVPrintFromBuffer(uint8_t *data, int datalen) {
if (t) {
PrintAndLog("TLV decoded:");
tlvdb_visit(t, print_cb, NULL);
tlvdb_visit(t, print_cb, NULL, 0);
tlvdb_free(t);
} else {
PrintAndLog("TLV ERROR: Can't parse response as TLV tree.");