Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
abonnaudet-ledger committed Nov 14, 2024
1 parent 98eaa57 commit c58c702
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
11 changes: 0 additions & 11 deletions include/os_endorsement.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
/* - ENDORSEMENT FEATURE - */
/* ----------------------------------------------------------------------- */

typedef enum endorsement_revoke_id_e {
ENDORSEMENT_REVOKE_ID_ALL = 0,
ENDORSEMENT_REVOKE_ID_SLOT1 = 1,
ENDORSEMENT_REVOKE_ID_SLOT2 = 2,
ENDORSEMENT_REVOKE_ID_LAST = 3,
} endorsement_revoke_id_t;

#define ENDORSEMENT_MAX_ASN1_LENGTH (1 + 1 + 2 * (1 + 1 + 33))

SYSCALL unsigned int os_endorsement_get_code_hash(unsigned char *buffer PLENGTH(32));
Expand All @@ -40,7 +33,3 @@ SYSCALL unsigned int os_endorsement_key2_derive_sign_data(unsigned char *src PLE

SYSCALL unsigned int os_endorsement_get_metadata(unsigned char index,
unsigned char *buffer PLENGTH(8));

SYSCALL void os_endorsement_revoke_slot1(void);
SYSCALL void os_endorsement_revoke_slot2(void);
SYSCALL void os_endorsement_revoke_all(void);
2 changes: 1 addition & 1 deletion include/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
#define SYSCALL_CERT_erase_ID 0x00000CA1
#endif // HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS

#define SYSCALL_os_bolos_endorsement_revoke_ID 0x010001ED
#define SYSCALL_ENDORSEMENT_revoke_slot_ID 0x010001ED

#ifdef HAVE_AEM_PIN
#define SYSCALL_os_aem_set_pin_ID 0x02000139
Expand Down
4 changes: 2 additions & 2 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1928,11 +1928,11 @@ void CERT_erase(void)
}
#endif // HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS

bolos_bool_t os_bolos_endorsement_revoke(uint8_t slot)
bolos_bool_t ENDORSEMENT_revoke_slot(uint8_t slot)
{
unsigned int parameters[1];
parameters[0] = (unsigned int) slot;
bolos_bool_t ret = SVC_Call(SYSCALL_os_bolos_endorsement_revoke_ID, parameters);
bolos_bool_t ret = SVC_Call(SYSCALL_ENDORSEMENT_revoke_slot_ID, parameters);
return ret;
}

Expand Down

0 comments on commit c58c702

Please sign in to comment.