mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-02-07 19:18:23 +00:00
Private/secret keys can be selected.
It returns FCP when a private/secret key is selected but it is not allowed to read them. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
080337f847
commit
80792dc555
1 changed files with 2 additions and 1 deletions
|
|
@ -222,6 +222,7 @@ static int cmd_select() {
|
|||
uint8_t pfx = fid >> 8;
|
||||
if (pfx == PRKD_PREFIX ||
|
||||
pfx == CD_PREFIX ||
|
||||
pfx == KEY_PREFIX ||
|
||||
pfx == EE_CERTIFICATE_PREFIX ||
|
||||
pfx == DCOD_PREFIX ||
|
||||
pfx == DATA_PREFIX ||
|
||||
|
|
@ -448,7 +449,7 @@ static int cmd_read_binary()
|
|||
}
|
||||
}
|
||||
|
||||
if (!authenticate_action(ef, ACL_OP_READ_SEARCH)) {
|
||||
if ((fid >> 8) == KEY_PREFIX || !authenticate_action(ef, ACL_OP_READ_SEARCH)) {
|
||||
return SW_SECURITY_STATUS_NOT_SATISFIED();
|
||||
}
|
||||
if (ef->data) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue