Skip to content

Commit

Permalink
algorithm config update effective immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
z4yx authored Dec 25, 2023
1 parent 0c2a5b8 commit a784504
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions applets/piv/piv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,8 @@ static int piv_algorithm_extension(const CAPDU *capdu, RAPDU *rapdu) {
if (DATA[0] != 0 && DATA[0] != 1) EXCEPT(SW_WRONG_DATA);
// We trust the rest data because no dangerous result will be caused even if the IDs are not unique.
if (write_file(ALGORITHM_EXT_CONFIG_PATH, DATA, 0, sizeof(alg_ext_cfg), 1) < 0) return -1;
// Effective immediately
memcpy(&alg_ext_cfg, DATA, sizeof(alg_ext_cfg));
}

return 0;
Expand Down

0 comments on commit a784504

Please sign in to comment.