]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - client/emv/emvcore.c
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2017 Merlok
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
7 //-----------------------------------------------------------------------------
9 //-----------------------------------------------------------------------------
13 static bool print_cb(void *data
, const struct tlv
*tlv
, int level
, bool is_leaf
) {
14 emv_tag_dump(tlv
, stdout
, level
);
16 dump_buffer(tlv
->value
, tlv
->len
, stdout
, level
);
22 void TLVPrintFromBuffer(uint8_t *data
, int datalen
) {
23 struct tlvdb
*t
= NULL
;
24 t
= tlvdb_parse_multi(data
, datalen
);
26 PrintAndLog("TLV decoded:");
28 tlvdb_visit(t
, print_cb
, NULL
, 0);
31 PrintAndLog("TLV ERROR: Can't parse response as TLV tree.");