Fix initialize with PUK store memory.

Now it is cleared.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-03-07 11:14:02 +01:00
parent cd525d91a3
commit 63b245b858

View File

@@ -38,6 +38,7 @@ int heapLeft() {
return left; return left;
} }
extern void reset_puk_store();
int cmd_initialize() { int cmd_initialize() {
if (apdu.nc > 0) { if (apdu.nc > 0) {
uint8_t mkek[MKEK_SIZE]; uint8_t mkek[MKEK_SIZE];
@@ -221,6 +222,7 @@ int cmd_initialize() {
return SW_EXEC_ERROR(); return SW_EXEC_ERROR();
} }
low_flash_available(); low_flash_available();
reset_puk_store();
} }
else { //free memory bytes request else { //free memory bytes request
int heap_left = heapLeft(); int heap_left = heapLeft();