Skip to content

Commit d8c6dea

Browse files
CERT: Refactoring of custom CA elements
Custom CA elements are now grouped in the `CERT` module in the OS. In this context, this commit: - Remove `os_customca_verify` syscall - Rename `custom_ca_get_info` and `custom_ca_revoke` syscalls
1 parent afadb33 commit d8c6dea

File tree

3 files changed

+7
-36
lines changed

3 files changed

+7
-36
lines changed

include/os_customca.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

include/syscalls.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,12 @@
201201
#define SYSCALL_os_dashboard_mbx_ID 0x02000150
202202

203203
#ifdef HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS
204-
#define SYSCALL_os_bolos_custom_ca_get_info_ID 0x01000CA0
205-
#define SYSCALL_os_bolos_custom_ca_revoke_ID 0x00000CA1
204+
#define SYSCALL_CERT_get_ID 0x01000CA0
205+
#define SYSCALL_CERT_erase_ID 0x00000CA1
206206
#endif // HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS
207207

208208
#define SYSCALL_os_bolos_endorsement_revoke_ID 0x010001ED
209209

210-
#ifdef HAVE_BOLOS_CUSTOMCA
211-
#define SYSCALL_os_customca_verify_ID 0x03000090
212-
#endif // HAVE_BOLOS_CUSTOMCA
213-
214210
#ifdef HAVE_AEM_PIN
215211
#define SYSCALL_os_aem_set_pin_ID 0x02000139
216212
#define SYSCALL_os_aem_unset_pin_ID 0x0000013a

src/syscalls.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,17 +1737,6 @@ void os_registry_delete_all_apps(void)
17371737
return;
17381738
}
17391739

1740-
#ifdef HAVE_BOLOS_CUSTOMCA
1741-
unsigned int os_customca_verify(unsigned char *hash, unsigned char *sign, unsigned int sign_length)
1742-
{
1743-
unsigned int parameters[3];
1744-
parameters[0] = (unsigned int) hash;
1745-
parameters[1] = (unsigned int) sign;
1746-
parameters[2] = (unsigned int) sign_length;
1747-
return (unsigned int) SVC_Call(SYSCALL_os_customca_verify_ID, parameters);
1748-
}
1749-
#endif // HAVE_BOLOS_CUSTOMCA
1750-
17511740
void os_sched_exec(unsigned int app_idx)
17521741
{
17531742
unsigned int parameters[2];
@@ -1928,19 +1917,20 @@ unsigned int os_deny_protected_flash(void)
19281917
}
19291918

19301919
#ifdef HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS
1931-
bolos_bool_t os_bolos_custom_ca_get_info(customca_data_t *custom_ca)
1920+
1921+
bolos_bool_t CERT_get(CERT_info_t *custom_ca)
19321922
{
19331923
unsigned int parameters[2];
19341924
parameters[0] = (unsigned int) custom_ca;
1935-
bolos_bool_t ret = (bolos_bool_t) SVC_Call(SYSCALL_os_bolos_custom_ca_get_info_ID, parameters);
1925+
bolos_bool_t ret = (bolos_bool_t) SVC_Call(SYSCALL_CERT_get_ID, parameters);
19361926
return ret;
19371927
}
19381928

1939-
void os_bolos_custom_ca_revoke(void)
1929+
void CERT_erase(void)
19401930
{
19411931
unsigned int parameters[1];
19421932
parameters[0] = 0;
1943-
SVC_Call(SYSCALL_os_bolos_custom_ca_revoke_ID, parameters);
1933+
SVC_Call(SYSCALL_CERT_erase_ID, parameters);
19441934
return;
19451935
}
19461936
#endif // HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS

0 commit comments

Comments
 (0)