yubico-piv-tool: use ykpiv_util_reset()
This commit is contained in:
+1
-12
@@ -253,18 +253,7 @@ generate_out:
|
||||
}
|
||||
|
||||
static bool reset(ykpiv_state *state) {
|
||||
unsigned char templ[] = {0, YKPIV_INS_RESET, 0, 0};
|
||||
unsigned char data[0xff];
|
||||
unsigned long recv_len = sizeof(data);
|
||||
int sw;
|
||||
|
||||
/* note: the reset function is only available when both pins are blocked. */
|
||||
if(ykpiv_transfer_data(state, templ, NULL, 0, data, &recv_len, &sw) != YKPIV_OK) {
|
||||
return false;
|
||||
} else if(sw == SW_SUCCESS) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return ykpiv_util_reset(state) == YKPIV_OK;
|
||||
}
|
||||
|
||||
static bool set_pin_retries(ykpiv_state *state, int pin_retries, int puk_retries, int verbose) {
|
||||
|
||||
Reference in New Issue
Block a user