Return error if a non-initialized key domain is deleted.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-03-09 18:27:47 +01:00
parent e4583eb9c0
commit bee6a7bb92
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -107,6 +107,9 @@ int cmd_key_domain() {
t[2 * p2 + 1] = current_dkeks = 0;
}
else if (p1 == 0x3) {
if (t[2 * p2] == 0xff || t[2 * p2 + 1] == 0xff) {
return SW_INCORRECT_P1P2();
}
t[2 * p2] = dkeks = 0xff;
t[2 * p2 + 1] = 0xff;
}