mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 01:18:06 +00:00
Fix binary read permission.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
c1a47ed023
commit
5630043a4d
1 changed files with 1 additions and 2 deletions
|
|
@ -18,7 +18,6 @@
|
|||
#include "sc_hsm.h"
|
||||
|
||||
int cmd_read_binary() {
|
||||
uint16_t fid = 0x0;
|
||||
uint16_t offset = 0;
|
||||
uint8_t ins = INS(apdu), p1 = P1(apdu), p2 = P2(apdu);
|
||||
const file_t *ef = NULL;
|
||||
|
|
@ -61,7 +60,7 @@ int cmd_read_binary() {
|
|||
}
|
||||
}
|
||||
|
||||
if ((fid >> 8) == KEY_PREFIX || !authenticate_action(ef, ACL_OP_READ_SEARCH)) {
|
||||
if ((ef->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