Fix returning the status of PIN1 when it is not initialized.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2022-06-07 19:58:21 +02:00
parent b14a323ef8
commit d057729675
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -518,7 +518,7 @@ static int cmd_verify() {
uint16_t opts = get_device_options();
if (opts & HSM_OPT_TRANSPORT_PIN)
return SW_DATA_INVALID();
if (file_get_data(file_pin1) == 0) //not initialized
if (*file_get_data(file_pin1) == 0) //not initialized
return SW_REFERENCE_NOT_FOUND();
if (apdu.nc > 0) {
return check_pin(file_pin1, apdu.data, apdu.nc);