From b8e9900bd51ed16b42603064f5c947fbfaeec08e Mon Sep 17 00:00:00 2001 From: merlokk Date: Mon, 8 Oct 2018 20:46:57 +0300 Subject: [PATCH] fix if certificate not found --- client/emv/cmdemv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/emv/cmdemv.c b/client/emv/cmdemv.c index 45a095fb..70251973 100644 --- a/client/emv/cmdemv.c +++ b/client/emv/cmdemv.c @@ -1234,7 +1234,7 @@ int CmdHFEMVScan(const char *cmd) { if (decodeTLV) TLVPrintFromBuffer(buf, len); - // check mode + // save mode if (tlvdb_get(tlvRoot, 0x9f38, NULL)) { JsonSaveStr(root, "$.Application.Mode", TransactionTypeStr[TrType]); } @@ -1354,8 +1354,10 @@ int CmdHFEMVScan(const char *cmd) { } // getting certificates - PrintAndLog("-->Recovering certificates."); - RecoveryCertificates(tlvRoot, root); + if (tlvdb_get(tlvRoot, 0x90, NULL)) { + PrintAndLog("-->Recovering certificates."); + RecoveryCertificates(tlvRoot, root); + } // DropField DropField();