mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Fix importing dkek twice.
It is not allowed anymore. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
202c8a4b22
commit
6a57e67629
1 changed files with 3 additions and 0 deletions
|
|
@ -51,6 +51,9 @@ int cmd_key_domain() {
|
|||
return SW_MEMORY_FAILURE();
|
||||
if (apdu.nc < 32)
|
||||
return SW_WRONG_LENGTH();
|
||||
if (current_dkeks == dkeks) {
|
||||
return SW_COMMAND_NOT_ALLOWED();
|
||||
}
|
||||
import_dkek_share(p2, apdu.data);
|
||||
if (++current_dkeks >= dkeks) {
|
||||
if (save_dkek_key(p2, NULL) != CCID_OK)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue