mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-10 17:49:32 +08:00
Fix signature command. Special response 0x9190 ?
This commit is contained in:
parent
3098a6bca0
commit
7191aa8b14
2 changed files with 6 additions and 2 deletions
|
@ -106,7 +106,7 @@ int DESFIRESendApdu(bool activate_field, bool leavefield_on, sAPDU apdu, uint8_t
|
|||
if (sw)
|
||||
*sw = isw;
|
||||
|
||||
if (isw != 0x9000 && isw != status(MFDES_OPERATION_OK) && isw != status(MFDES_ADDITIONAL_FRAME) && isw != status(MFDES_NO_CHANGES)) {
|
||||
if (isw != 0x9000 && isw != status(MFDES_OPERATION_OK) && isw != status(MFDES_SIGNATURE) && isw != status(MFDES_ADDITIONAL_FRAME) && isw != status(MFDES_NO_CHANGES)) {
|
||||
if (GetAPDULogging()) {
|
||||
if (isw >> 8 == 0x61) {
|
||||
PrintAndLogEx(ERR, "APDU chaining len: 0x%02x -->", isw & 0xff);
|
||||
|
@ -259,7 +259,6 @@ static int send_desfire_cmd(sAPDU *apdu, bool select, uint8_t *dest, int *recv_l
|
|||
int i = 1;
|
||||
int res = DESFIRESendApdu(select, true, *apdu, data, sizeof(data), &resplen, sw);
|
||||
if (res != PM3_SUCCESS) {
|
||||
if (apdu->INS==MFDES_READSIG) return PM3_SUCCESS; //Fix me ! Error code 0x9190 ???
|
||||
if (g_debugMode>1) GetErrorString(res,sw);
|
||||
return res;
|
||||
}
|
||||
|
@ -451,6 +450,7 @@ static int get_desfire_signature(uint8_t *signature, size_t *signature_len) {
|
|||
if (recv_len != 56) {
|
||||
*signature_len = 0;
|
||||
DropField();
|
||||
PrintAndLogEx(SUCCESS, " Signature verified: %d " _GREEN_("successful"), recv_len);
|
||||
return PM3_ESOFT;
|
||||
} else {
|
||||
*signature_len = recv_len;
|
||||
|
@ -974,6 +974,9 @@ static int CmdHF14ADesInfo(const char *Cmd) {
|
|||
|
||||
if (get_desfire_signature(signature, &signature_len) == PM3_SUCCESS)
|
||||
desfire_print_signature(package->uid, signature, signature_len, cardtype);
|
||||
else{
|
||||
PrintAndLogEx(WARNING, "--- " _YELLOW_("Couldn't verify signature."));
|
||||
}
|
||||
|
||||
// Master Key settings
|
||||
uint8_t master_aid[3] = {0x00, 0x00, 0x00};
|
||||
|
|
|
@ -401,6 +401,7 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
|
|||
#define MFDES_E_EEPROM 0xEE
|
||||
#define MFDES_E_FILE_NOT_FOUND 0xF0
|
||||
#define MFDES_E_FILE_INTEGRITY 0xF1
|
||||
#define MFDES_SIGNATURE 0x90
|
||||
|
||||
|
||||
#define MFDES_CREATE_CYCLIC_RECORD_FILE 0xC0
|
||||
|
|
Loading…
Reference in a new issue