mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-13 10:07:25 -07:00
epa: check EPA_PACE_MSE_Set_AT return value
This commit is contained in:
parent
2c41a61ee3
commit
fb07fd92f3
1 changed files with 6 additions and 1 deletions
|
@ -305,6 +305,11 @@ void EPA_PACE_Collect_Nonce(UsbCommand *c) {
|
|||
// initiate the PACE protocol
|
||||
// use the CAN for the password since that doesn't change
|
||||
func_return = EPA_PACE_MSE_Set_AT(pace_version_info, 2);
|
||||
// check if the command succeeded
|
||||
if (func_return != 0) {
|
||||
EPA_PACE_Collect_Nonce_Abort(4, func_return);
|
||||
return;
|
||||
}
|
||||
|
||||
// now get the nonce
|
||||
uint8_t nonce[256] = {0};
|
||||
|
@ -312,7 +317,7 @@ void EPA_PACE_Collect_Nonce(UsbCommand *c) {
|
|||
func_return = EPA_PACE_Get_Nonce(requested_size, nonce);
|
||||
// check if the command succeeded
|
||||
if (func_return < 0) {
|
||||
EPA_PACE_Collect_Nonce_Abort(4, func_return);
|
||||
EPA_PACE_Collect_Nonce_Abort(5, func_return);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue