Fix when generating keypair, which could produce wrong flash save in particular cases of concurrency.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-04-11 15:09:20 +02:00
parent 239e01c3f8
commit 1557a4a039

View File

@@ -1042,6 +1042,7 @@ static int cmd_keypair_gen() {
ret = flash_write_data_to_file(fpk, res_APDU, res_APDU_size);
if (ret != 0)
return SW_EXEC_ERROR();
low_flash_available();
return SW_OK();
}