Allow signatures with device key.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -101,7 +101,7 @@ int cmd_signature() {
|
|||||||
if (!isUserAuthenticated) {
|
if (!isUserAuthenticated) {
|
||||||
return SW_SECURITY_STATUS_NOT_SATISFIED();
|
return SW_SECURITY_STATUS_NOT_SATISFIED();
|
||||||
}
|
}
|
||||||
if (!(fkey = search_dynamic_file((KEY_PREFIX << 8) | key_id)) || !file_has_data(fkey)) {
|
if ((!(fkey = search_dynamic_file((KEY_PREFIX << 8) | key_id)) && !(fkey = search_by_fid((KEY_PREFIX << 8) | key_id, NULL, SPECIFY_EF))) || !file_has_data(fkey)) {
|
||||||
return SW_FILE_NOT_FOUND();
|
return SW_FILE_NOT_FOUND();
|
||||||
}
|
}
|
||||||
if (get_key_counter(fkey) == 0) {
|
if (get_key_counter(fkey) == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user