mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Call reset puk store on init.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
63b245b858
commit
fb4ff9424e
1 changed files with 9 additions and 5 deletions
|
|
@ -218,11 +218,7 @@ int puk_store_select_chr(const uint8_t *chr) {
|
|||
return CCID_ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
void init_sc_hsm() {
|
||||
scan_all();
|
||||
has_session_pin = has_session_sopin = false;
|
||||
isUserAuthenticated = false;
|
||||
cmd_select();
|
||||
void reset_puk_store() {
|
||||
if (puk_store_entries > 0) { /* From previous session */
|
||||
for (int i = 0; i < puk_store_entries; i++) {
|
||||
if (puk_store[i].copied == true) {
|
||||
|
|
@ -251,6 +247,14 @@ void init_sc_hsm() {
|
|||
memset(puk_status, 0, sizeof(puk_status));
|
||||
}
|
||||
|
||||
void init_sc_hsm() {
|
||||
scan_all();
|
||||
has_session_pin = has_session_sopin = false;
|
||||
isUserAuthenticated = false;
|
||||
cmd_select();
|
||||
reset_puk_store();
|
||||
}
|
||||
|
||||
int sc_hsm_unload() {
|
||||
has_session_pin = has_session_sopin = false;
|
||||
isUserAuthenticated = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue