mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Fix storing SO-PIN session when checking PIN with SO-PIN.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
b9ec473aaa
commit
84f646dbad
1 changed files with 6 additions and 3 deletions
|
|
@ -353,11 +353,14 @@ int check_pin(const file_t *pin, const uint8_t *data, size_t len) {
|
|||
return SW_MEMORY_FAILURE();
|
||||
if (pka_enabled() == false)
|
||||
isUserAuthenticated = true;
|
||||
hash_multi(data, len, session_pin);
|
||||
if (pin == file_pin1)
|
||||
if (pin == file_pin1) {
|
||||
hash_multi(data, len, session_pin);
|
||||
has_session_pin = true;
|
||||
else if (pin == file_sopin)
|
||||
}
|
||||
else if (pin == file_sopin) {
|
||||
hash_multi(data, len, session_sopin);
|
||||
has_session_sopin = true;
|
||||
}
|
||||
return SW_OK();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue