mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Fix deleting KEK when a key is present in the key domain.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
da841b82d4
commit
2e88422c86
1 changed files with 1 additions and 1 deletions
|
|
@ -966,7 +966,7 @@ static int cmd_key_domain() {
|
|||
else if (p1 == 0x1 || p1 == 0x3 || p1 == 0x4) { //key domain setup
|
||||
if (p1 == 0x1 && apdu.nc != 1)
|
||||
return SW_WRONG_LENGTH();
|
||||
if (p1 == 0x3 || p1 == 0x4) { //if key domain is not empty, command is denied
|
||||
if (p1 == 0x3) { //if key domain is not empty, command is denied
|
||||
for (int i = 0; i < dynamic_files; i++) {
|
||||
if (get_key_domain(&dynamic_file[i]) == p2)
|
||||
return SW_FILE_EXISTS();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue