diff --git a/include/os_customca.h b/include/os_customca.h deleted file mode 100644 index dad024da..00000000 --- a/include/os_customca.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#ifdef HAVE_BOLOS_CUSTOMCA -#include "bolos_target.h" -#include "decorators.h" - -/* ----------------------------------------------------------------------- */ -/* - CUSTOM CERTIFICATE AUTHORITY - */ -/* ----------------------------------------------------------------------- */ - -// Verify the signature is issued from the custom certificate authority -SYSCALL unsigned int os_customca_verify(unsigned char *hash PLENGTH(32), - unsigned char *sign PLENGTH(sign_length), - unsigned int sign_length); -#endif // HAVE_BOLOS_CUSTOMCA diff --git a/include/syscalls.h b/include/syscalls.h index 117e4fab..bab67e65 100644 --- a/include/syscalls.h +++ b/include/syscalls.h @@ -201,16 +201,12 @@ #define SYSCALL_os_dashboard_mbx_ID 0x02000150 #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 +#define SYSCALL_CERT_get_ID 0x01000CA0 +#define SYSCALL_CERT_erase_ID 0x00000CA1 #endif // HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS #define SYSCALL_os_bolos_endorsement_revoke_ID 0x010001ED -#ifdef HAVE_BOLOS_CUSTOMCA -#define SYSCALL_os_customca_verify_ID 0x03000090 -#endif // HAVE_BOLOS_CUSTOMCA - #ifdef HAVE_AEM_PIN #define SYSCALL_os_aem_set_pin_ID 0x02000139 #define SYSCALL_os_aem_unset_pin_ID 0x0000013a diff --git a/src/syscalls.c b/src/syscalls.c index 8350502e..25d07f04 100644 --- a/src/syscalls.c +++ b/src/syscalls.c @@ -1730,17 +1730,6 @@ void os_registry_delete_all_apps(void) return; } -#ifdef HAVE_BOLOS_CUSTOMCA -unsigned int os_customca_verify(unsigned char *hash, unsigned char *sign, unsigned int sign_length) -{ - unsigned int parameters[3]; - parameters[0] = (unsigned int) hash; - parameters[1] = (unsigned int) sign; - parameters[2] = (unsigned int) sign_length; - return (unsigned int) SVC_Call(SYSCALL_os_customca_verify_ID, parameters); -} -#endif // HAVE_BOLOS_CUSTOMCA - void os_sched_exec(unsigned int app_idx) { unsigned int parameters[2]; @@ -1921,19 +1910,20 @@ unsigned int os_deny_protected_flash(void) } #ifdef HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS -bolos_bool_t os_bolos_custom_ca_get_info(customca_data_t *custom_ca) + +bolos_bool_t CERT_get(CERT_info_t *custom_ca) { unsigned int parameters[2]; parameters[0] = (unsigned int) custom_ca; - bolos_bool_t ret = (bolos_bool_t) SVC_Call(SYSCALL_os_bolos_custom_ca_get_info_ID, parameters); + bolos_bool_t ret = (bolos_bool_t) SVC_Call(SYSCALL_CERT_get_ID, parameters); return ret; } -void os_bolos_custom_ca_revoke(void) +void CERT_erase(void) { unsigned int parameters[1]; parameters[0] = 0; - SVC_Call(SYSCALL_os_bolos_custom_ca_revoke_ID, parameters); + SVC_Call(SYSCALL_CERT_erase_ID, parameters); return; } #endif // HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS