mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
Replace WITH_SMARTCARD by dynamic detection in client
This commit is contained in:
parent
cad676a23c
commit
6b2677c154
2 changed files with 19 additions and 23 deletions
|
@ -809,13 +809,12 @@ static int CmdEMVExec(const char *Cmd) {
|
|||
uint8_t psenum = (channel == ECC_CONTACT) ? 1 : 2;
|
||||
CLIParserFree();
|
||||
|
||||
#ifndef WITH_SMARTCARD
|
||||
// not compiled with smartcard functionality, we need to exit
|
||||
if (channel == ECC_CONTACT) {
|
||||
PrintAndLogEx(WARNING, "PM3 Client is not compiled with support for SMARTCARD. Exiting.");
|
||||
return PM3_EDEVNOTSUPP;
|
||||
if (!IfPm3Smartcard()) {
|
||||
if (channel == ECC_CONTACT) {
|
||||
PrintAndLogEx(WARNING, "PM3 does not have SMARTCARD support. Exiting.");
|
||||
return PM3_EDEVNOTSUPP;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
SetAPDULogging(showAPDU);
|
||||
|
||||
|
@ -1400,13 +1399,12 @@ static int CmdEMVScan(const char *Cmd) {
|
|||
CLIGetStrWithReturn(12, relfname, &relfnamelen);
|
||||
CLIParserFree();
|
||||
|
||||
#ifndef WITH_SMARTCARD
|
||||
// not compiled with smartcard functionality, we need to exit
|
||||
if (channel == ECC_CONTACT) {
|
||||
PrintAndLogEx(ERR, "PM3 Client is not compiled with support for SMARTCARD. Exiting.");
|
||||
return PM3_EDEVNOTSUPP;
|
||||
if (!IfPm3Smartcard()) {
|
||||
if (channel == ECC_CONTACT) {
|
||||
PrintAndLogEx(WARNING, "PM3 does not have SMARTCARD support. Exiting.");
|
||||
return PM3_EDEVNOTSUPP;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
SetAPDULogging(showAPDU);
|
||||
|
||||
|
@ -1736,13 +1734,12 @@ static int CmdEMVRoca(const char *Cmd) {
|
|||
PrintChannel(channel);
|
||||
CLIParserFree();
|
||||
|
||||
#ifndef WITH_SMARTCARD
|
||||
// not compiled with smartcard functionality, we need to exit
|
||||
if (channel == ECC_CONTACT) {
|
||||
PrintAndLogEx(WARNING, "PM3 Client is not compiled with support for SMARTCARD. Exiting.");
|
||||
return PM3_EDEVNOTSUPP;
|
||||
if (!IfPm3Smartcard()) {
|
||||
if (channel == ECC_CONTACT) {
|
||||
PrintAndLogEx(WARNING, "PM3 does not have SMARTCARD support. Exiting.");
|
||||
return PM3_EDEVNOTSUPP;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// select card
|
||||
uint8_t psenum = (channel == ECC_CONTACT) ? 1 : 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue