Skip to content

Commit

Permalink
Rename HAVE_CUSTOM_CA_SETTINGS to HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS
Browse files Browse the repository at this point in the history
Add HAVE_ENDORSEMENT_DETAILS_IN_SETTINGS compil flag
  • Loading branch information
PhilippeBonnaz committed Jul 5, 2023
1 parent 6eab565 commit f809228
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions include/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,14 @@
#define SYSCALL_os_allow_protected_ram_ID 0x00000092
#define SYSCALL_os_deny_protected_ram_ID 0x00000093

#ifdef HAVE_CUSTOM_CA_SETTINGS
#ifdef HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS
#define SYSCALL_os_bolos_custom_ca_get_info_ID 0x01000CA0
#define SYSCALL_os_bolos_custom_ca_revoke_ID 0x00000CA1
#endif // HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS

#ifdef HAVE_ENDORSEMENT_DETAILS_IN_SETTINGS
#define SYSCALL_os_bolos_endorsement_revoke_ID 0x010001ED
#endif // HAVE_CUSTOM_CA_SETTINGS
#endif

#ifndef HAVE_BOLOS_NO_CUSTOMCA
#define SYSCALL_os_customca_verify_ID 0x03000090
Expand Down
6 changes: 4 additions & 2 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ unsigned int os_deny_protected_flash( void ) {
return (unsigned int) SVC_Call(SYSCALL_os_deny_protected_flash_ID, parameters);
}

#ifdef HAVE_CUSTOM_CA_SETTINGS
#ifdef HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS
bolos_bool_t os_bolos_custom_ca_get_info(customca_data_t *custom_ca) {
unsigned int parameters[2];
parameters[0] = (unsigned int) custom_ca;
Expand All @@ -1570,14 +1570,16 @@ void os_bolos_custom_ca_revoke(void) {
SVC_Call(SYSCALL_os_bolos_custom_ca_revoke_ID, parameters);
return;
}
#endif //HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS

#ifdef HAVE_ENDORSEMENT_DETAILS_IN_SETTINGS
bolos_bool_t os_bolos_endorsement_revoke(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);
return ret;
}
#endif //HAVE_CUSTOM_CA_SETTINGS
#endif

#ifdef HAVE_MCU_SERIAL_STORAGE
unsigned int os_seph_serial ( unsigned char * serial, unsigned int maxlength ) {
Expand Down

0 comments on commit f809228

Please sign in to comment.