diff --git a/components/TARGET_PSA/TESTS/compliance_attestation/test_a001/main.c b/components/TARGET_PSA/TESTS/compliance_attestation/test_a001/main.c new file mode 100644 index 0000000000..84230cf9c2 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_attestation/test_a001/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_a001(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_a001); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c001/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c001/main.c new file mode 100644 index 0000000000..f8ef4c0c23 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c001/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c001(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c001); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c002/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c002/main.c new file mode 100644 index 0000000000..1c48a3f8d6 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c002/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c002(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c002); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c003/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c003/main.c new file mode 100644 index 0000000000..965851b6f7 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c003/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c003(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c003); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c004/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c004/main.c new file mode 100644 index 0000000000..a3da36bd78 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c004/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c004(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c004); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c005/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c005/main.c new file mode 100644 index 0000000000..a0fc514b68 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c005/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c005(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c005); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c006/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c006/main.c new file mode 100644 index 0000000000..81cb6d7c93 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c006/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c006(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c006); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c007/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c007/main.c new file mode 100644 index 0000000000..c1ef0cee9c --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c007/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c007(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c007); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c008/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c008/main.c new file mode 100644 index 0000000000..019bf3361c --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c008/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c008(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c008); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c009/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c009/main.c new file mode 100644 index 0000000000..8a754b4b2c --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c009/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c009(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c009); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c010/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c010/main.c new file mode 100644 index 0000000000..1118b3c01e --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c010/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c010(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c010); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c011/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c011/main.c new file mode 100644 index 0000000000..7def88b16e --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c011/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c011(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c011); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c012/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c012/main.c new file mode 100644 index 0000000000..a3ffb0103c --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c012/main.c @@ -0,0 +1,10 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" +#include "unity/unity.h" + +void test_entry_c012(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c012); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c013/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c013/main.c new file mode 100644 index 0000000000..ac2a28ba1a --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c013/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c013(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c013); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c014/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c014/main.c new file mode 100644 index 0000000000..711be3dd09 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c014/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c014(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c014); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c015/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c015/main.c new file mode 100644 index 0000000000..e754678b80 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c015/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c015(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c015); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c016/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c016/main.c new file mode 100644 index 0000000000..de1007222a --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c016/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c016(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c016); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c017/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c017/main.c new file mode 100644 index 0000000000..9b38969f48 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c017/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c017(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c017); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c018/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c018/main.c new file mode 100644 index 0000000000..a804d08b34 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c018/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c018(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c018); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c019/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c019/main.c new file mode 100644 index 0000000000..3f659d377d --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c019/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c019(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c019); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c020/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c020/main.c new file mode 100644 index 0000000000..1eb36a467c --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c020/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c020(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c020); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c021/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c021/main.c new file mode 100644 index 0000000000..cd8d9b3cb2 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c021/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c021(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c021); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c022/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c022/main.c new file mode 100644 index 0000000000..2ad8e8b314 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c022/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c022(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c022); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c023/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c023/main.c new file mode 100644 index 0000000000..4e0e630614 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c023/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c023(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c023); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c024/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c024/main.c new file mode 100644 index 0000000000..5ddf2edd57 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c024/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c024(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c024); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c025/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c025/main.c new file mode 100644 index 0000000000..381a32c6df --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c025/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c025(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c025); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c026/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c026/main.c new file mode 100644 index 0000000000..6c2268e4cd --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c026/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c026(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c026); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c027/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c027/main.c new file mode 100644 index 0000000000..94b747834a --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c027/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c027(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c027); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c028/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c028/main.c new file mode 100644 index 0000000000..740eafcbc9 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c028/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c028(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c028); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c029/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c029/main.c new file mode 100644 index 0000000000..287bad5733 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c029/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c029(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c029); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c030/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c030/main.c new file mode 100644 index 0000000000..6509369924 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c030/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c030(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c030); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c031/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c031/main.c new file mode 100644 index 0000000000..905c4c1b24 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c031/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c031(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c031); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c032/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c032/main.c new file mode 100644 index 0000000000..907dc03ea1 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c032/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c032(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c032); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c033/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c033/main.c new file mode 100644 index 0000000000..588090c943 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c033/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c033(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c033); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c034/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c034/main.c new file mode 100644 index 0000000000..df93ee5cd0 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c034/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c034(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c034); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c035/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c035/main.c new file mode 100644 index 0000000000..fb7a31cc59 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c035/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c035(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c035); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c036/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c036/main.c new file mode 100644 index 0000000000..066acc4399 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c036/main.c @@ -0,0 +1,10 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" +#include "unity/unity.h" + +void test_entry_c036(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c036); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c037/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c037/main.c new file mode 100644 index 0000000000..9e5b36fa33 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c037/main.c @@ -0,0 +1,10 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" +#include "unity/unity.h" + +void test_entry_c037(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c037); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c038/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c038/main.c new file mode 100644 index 0000000000..2f687f0a73 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c038/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c038(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c038); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c039/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c039/main.c new file mode 100644 index 0000000000..326556ebdd --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c039/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c039(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c039); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c040/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c040/main.c new file mode 100644 index 0000000000..8b7aec261e --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c040/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c040(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c040); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c041/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c041/main.c new file mode 100644 index 0000000000..d0485b2dc7 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c041/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c041(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c041); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c042/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c042/main.c new file mode 100644 index 0000000000..2572035f79 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c042/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c042(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c042); +} diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c043/main.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c043/main.c new file mode 100644 index 0000000000..a6809298e8 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c043/main.c @@ -0,0 +1,9 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +void test_entry_c043(val_api_t *val_api, psa_api_t *psa_api); + +int main(void) +{ + test_start(test_entry_c043); +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s001/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s001/main.c new file mode 100644 index 0000000000..1f6e0df6ce --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s001/main.c @@ -0,0 +1,17 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +#ifdef ITS_TEST +void test_entry_s001(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p001(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s001); +#elif PS_TEST + test_start(test_entry_p001); +#endif +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s002/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s002/main.c new file mode 100644 index 0000000000..8b06dbb565 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s002/main.c @@ -0,0 +1,18 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" +#include "lifecycle.h" + +#ifdef ITS_TEST +void test_entry_s002(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p002(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s002); +#elif PS_TEST + test_start(test_entry_p002); +#endif +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s003/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s003/main.c new file mode 100644 index 0000000000..31faef86b7 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s003/main.c @@ -0,0 +1,20 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" +#include "lifecycle.h" + +#ifdef ITS_TEST +void test_entry_s003(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +#error [NOT_SUPPORTED] Test is too long for CI, thus always fails on timeout. +void test_entry_p003(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s003); +#elif PS_TEST + test_start(test_entry_p003); +#endif + +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s004/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s004/main.c new file mode 100644 index 0000000000..9c80a1a558 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s004/main.c @@ -0,0 +1,17 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +#ifdef ITS_TEST +void test_entry_s004(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p004(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s004); +#elif PS_TEST + test_start(test_entry_p004); +#endif +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s005/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s005/main.c new file mode 100644 index 0000000000..dd69bd701e --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s005/main.c @@ -0,0 +1,17 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +#ifdef ITS_TEST +void test_entry_s005(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p005(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s005); +#elif PS_TEST + test_start(test_entry_p005); +#endif +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s006/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s006/main.c new file mode 100644 index 0000000000..12392ca646 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s006/main.c @@ -0,0 +1,17 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +#ifdef ITS_TEST +void test_entry_s006(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p006(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s006); +#elif PS_TEST + test_start(test_entry_p006); +#endif +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s007/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s007/main.c new file mode 100644 index 0000000000..0bf1081abf --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s007/main.c @@ -0,0 +1,17 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +#ifdef ITS_TEST +void test_entry_s007(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p007(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s007); +#elif PS_TEST + test_start(test_entry_p007); +#endif +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s008/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s008/main.c new file mode 100644 index 0000000000..75b4de0a0f --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s008/main.c @@ -0,0 +1,17 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +#ifdef ITS_TEST +void test_entry_s008(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p008(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s008); +#elif PS_TEST + test_start(test_entry_p008); +#endif +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s009/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s009/main.c new file mode 100644 index 0000000000..b4b2d3c2e6 --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s009/main.c @@ -0,0 +1,17 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +#ifdef ITS_TEST +void test_entry_s009(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p009(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s009); +#elif PS_TEST + test_start(test_entry_p009); +#endif +} diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s010/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s010/main.c new file mode 100644 index 0000000000..875fc1d96b --- /dev/null +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s010/main.c @@ -0,0 +1,17 @@ +#include "val_interfaces.h" +#include "pal_mbed_os_crypto.h" + +#ifdef ITS_TEST +void test_entry_s010(val_api_t *val_api, psa_api_t *psa_api); +#elif PS_TEST +void test_entry_p010(val_api_t *val_api, psa_api_t *psa_api); +#endif + +int main(void) +{ +#ifdef ITS_TEST + test_start(test_entry_s010); +#elif PS_TEST + test_start(test_entry_p010); +#endif +} diff --git a/features/frameworks/TARGET_PSA/pal/pal_mbed_os_crypto.cpp b/features/frameworks/TARGET_PSA/pal/pal_mbed_os_crypto.cpp index 1a772a2c7d..a53246ddf8 100644 --- a/features/frameworks/TARGET_PSA/pal/pal_mbed_os_crypto.cpp +++ b/features/frameworks/TARGET_PSA/pal/pal_mbed_os_crypto.cpp @@ -6,6 +6,8 @@ #include "psa/crypto.h" #include "entropy_poll.h" +#include "psa_attest_inject_key.h" + #include "pal_mbed_os_crypto.h" #include "lifecycle.h" @@ -19,6 +21,42 @@ extern "C" psa_status_t psa_ps_reset(); test_entry_f test_g = NULL; + +static void psa_attestation_inject_key_for_test(void) +{ +#ifndef PSA_ATTESTATION_DISABLED + const uint8_t private_key_data[] = { + 0x49, 0xc9, 0xa8, 0xc1, 0x8c, 0x4b, 0x88, 0x56, + 0x38, 0xc4, 0x31, 0xcf, 0x1d, 0xf1, 0xc9, 0x94, + 0x13, 0x16, 0x09, 0xb5, 0x80, 0xd4, 0xfd, 0x43, + 0xa0, 0xca, 0xb1, 0x7d, 0xb2, 0xf1, 0x3e, 0xee + }; + + const uint8_t public_key_data[] = { + 0x04, 0x77, 0x72, 0x65, 0x6f, 0x81, 0x4b, 0x39, + 0x92, 0x79, 0xd5, 0xe1, 0xf1, 0x78, 0x1f, 0xac, + 0x6f, 0x09, 0x9a, 0x3c, 0x5c, 0xa1, 0xb0, 0xe3, + 0x53, 0x51, 0x83, 0x4b, 0x08, 0xb6, 0x5e, 0x0b, + 0x57, 0x25, 0x90, 0xcd, 0xaf, 0x8f, 0x76, 0x93, + 0x61, 0xbc, 0xf3, 0x4a, 0xcf, 0xc1, 0x1e, 0x5e, + 0x07, 0x4e, 0x84, 0x26, 0xbd, 0xde, 0x04, 0xbe, + 0x6e, 0x65, 0x39, 0x45, 0x44, 0x96, 0x17, 0xde, + 0x45 + }; + psa_status_t status = PSA_SUCCESS; + size_t exported_length; + uint8_t exported[sizeof(public_key_data)]; + psa_crypto_init(); + psa_attestation_inject_key(private_key_data, + sizeof(private_key_data), + PSA_KEY_TYPE_ECC_KEYPAIR(PSA_ECC_CURVE_SECP256R1), + exported, + sizeof(exported), + &exported_length); +#endif +} + + #if defined(MBEDTLS_ENTROPY_NV_SEED) || defined(COMPONENT_PSA_SRV_IPC) #if !defined(MAX) @@ -50,6 +88,7 @@ void main_wrapper(void) #if defined(MBEDTLS_ENTROPY_NV_SEED) || defined(COMPONENT_PSA_SRV_IPC) inject_entropy(); #endif /* defined(MBEDTLS_ENTROPY_NV_SEED) || defined(COMPONENT_PSA_SRV_IPC) */ + psa_attestation_inject_key_for_test(); // inject key incase needed test_g(&val_api, &psa_api); #ifdef ITS_TEST