added save mode

This commit is contained in:
merlokk 2018-10-08 20:33:55 +03:00
commit 2989702f0f
3 changed files with 14 additions and 0 deletions

View file

@ -1234,6 +1234,11 @@ int CmdHFEMVScan(const char *cmd) {
if (decodeTLV)
TLVPrintFromBuffer(buf, len);
// check mode
if (tlvdb_get(tlvRoot, 0x9f38, NULL)) {
JsonSaveStr(root, "$.Application.Mode", TransactionTypeStr[TrType]);
}
struct tlvdb *fci = tlvdb_parse_multi(buf, len);
if (extractTLVElements)
JsonSaveTLVTree(root, root, "$.Application.FCITemplate", fci);

View file

@ -19,6 +19,13 @@ static const char *PSElist [] = {
};
//static const size_t PSElistLen = sizeof(PSElist)/sizeof(char*);
char *TransactionTypeStr[] = {
"MSD",
"VSDC",
"qVCDCMCHIP",
"CDA"
};
typedef struct {
enum CardPSVendor vendor;
const char* aid;

View file

@ -39,6 +39,8 @@ enum TransactionType {
TT_CDA,
};
extern char *TransactionTypeStr[];
typedef struct {
uint8_t CLA;
uint8_t INS;