mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-12 08:06:25 -07: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)
|
if (sw)
|
||||||
*sw = isw;
|
*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 (GetAPDULogging()) {
|
||||||
if (isw >> 8 == 0x61) {
|
if (isw >> 8 == 0x61) {
|
||||||
PrintAndLogEx(ERR, "APDU chaining len: 0x%02x -->", isw & 0xff);
|
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 i = 1;
|
||||||
int res = DESFIRESendApdu(select, true, *apdu, data, sizeof(data), &resplen, sw);
|
int res = DESFIRESendApdu(select, true, *apdu, data, sizeof(data), &resplen, sw);
|
||||||
if (res != PM3_SUCCESS) {
|
if (res != PM3_SUCCESS) {
|
||||||
if (apdu->INS==MFDES_READSIG) return PM3_SUCCESS; //Fix me ! Error code 0x9190 ???
|
|
||||||
if (g_debugMode>1) GetErrorString(res,sw);
|
if (g_debugMode>1) GetErrorString(res,sw);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -451,6 +450,7 @@ static int get_desfire_signature(uint8_t *signature, size_t *signature_len) {
|
||||||
if (recv_len != 56) {
|
if (recv_len != 56) {
|
||||||
*signature_len = 0;
|
*signature_len = 0;
|
||||||
DropField();
|
DropField();
|
||||||
|
PrintAndLogEx(SUCCESS, " Signature verified: %d " _GREEN_("successful"), recv_len);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
} else {
|
} else {
|
||||||
*signature_len = recv_len;
|
*signature_len = recv_len;
|
||||||
|
@ -974,6 +974,9 @@ static int CmdHF14ADesInfo(const char *Cmd) {
|
||||||
|
|
||||||
if (get_desfire_signature(signature, &signature_len) == PM3_SUCCESS)
|
if (get_desfire_signature(signature, &signature_len) == PM3_SUCCESS)
|
||||||
desfire_print_signature(package->uid, signature, signature_len, cardtype);
|
desfire_print_signature(package->uid, signature, signature_len, cardtype);
|
||||||
|
else{
|
||||||
|
PrintAndLogEx(WARNING, "--- " _YELLOW_("Couldn't verify signature."));
|
||||||
|
}
|
||||||
|
|
||||||
// Master Key settings
|
// Master Key settings
|
||||||
uint8_t master_aid[3] = {0x00, 0x00, 0x00};
|
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_EEPROM 0xEE
|
||||||
#define MFDES_E_FILE_NOT_FOUND 0xF0
|
#define MFDES_E_FILE_NOT_FOUND 0xF0
|
||||||
#define MFDES_E_FILE_INTEGRITY 0xF1
|
#define MFDES_E_FILE_INTEGRITY 0xF1
|
||||||
|
#define MFDES_SIGNATURE 0x90
|
||||||
|
|
||||||
|
|
||||||
#define MFDES_CREATE_CYCLIC_RECORD_FILE 0xC0
|
#define MFDES_CREATE_CYCLIC_RECORD_FILE 0xC0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue