Test all libtropic main API functions. More...
Files | |
| file | libtropic_functional_tests.h |
| Functions with functional tests used internally for testing behaviour of TROPIC01 chip. | |
Macros | |
| #define | LT_TEST_ASSERT(expected, value) |
| #define | LT_TEST_ASSERT_COND(value, condition, expected_if_true, expected_if_false) |
| #define | LT_FINISH_TEST() |
Functions | |
| void | lt_assert_fail_handler (void) |
Called when LT_TEST_ASSERT or LT_TEST_ASSERT_COND fails. | |
| void | hexdump_8byte (const uint8_t *data, uint16_t size) |
| Non-test function to dump bytes in 8 byte rows. | |
| int | chip_id_printf_wrapper (const char *format,...) |
| Printf-like wrapper for LT_LOG_INFO used with lt_print_chip_id(). | |
| void | lt_test_rev_eddsa_sign (lt_handle_t *h) |
| Tests EDDSA_Sign command. | |
| void | lt_test_rev_ecdsa_sign (lt_handle_t *h) |
| Tests ECDSA_Sign command. | |
| void | lt_test_ire_pairing_key_slots (lt_handle_t *h) |
| Test Pairing_Key_Read, Pairing_Key_Write and Pairing_Key_Invalidate on all slots. | |
| void | lt_test_rev_ping (lt_handle_t *h) |
| Test Ping L3 command with random data of random length <= TR01_PING_LEN_MAX. | |
| void | lt_test_rev_r_mem (lt_handle_t *h) |
| Test R_Mem_Data_* commands on all User Data slots. | |
| void | lt_test_rev_erase_r_config (lt_handle_t *h) |
| Backs up R-Config, erases it and then restores it. | |
| void | lt_test_rev_handshake_req (lt_handle_t *h) |
| Test Secure Session initialization using handshake request and abortion of the Session. | |
| void | lt_test_rev_mcounter (lt_handle_t *h) |
| Test monotonic counter API - lt_mcounter_init, lt_mcounter_get, lt_mcounter_update. | |
| void | lt_test_rev_get_info_req_app (lt_handle_t *h) |
| Test Get_Info_Req command in Application mode with all possible OBJECT_ID values. | |
| void | lt_test_rev_get_info_req_bootloader (lt_handle_t *h) |
| Test Get_Info_Req command in Maintenance mode with all possible OBJECT_ID values. | |
| void | lt_test_rev_read_i_config (lt_handle_t *h) |
| Reads contents of I-Config and prints it to the log. | |
| void | lt_test_ire_write_i_config (lt_handle_t *h) |
| Tests writing the I-Config. | |
| void | lt_test_rev_read_r_config (lt_handle_t *h) |
| Reads contents of R-Config and prints it to the log. | |
| void | lt_test_rev_resend_req (lt_handle_t *h) |
| Test Resend_Req L2 request in Application and Maintenance mode. | |
| void | lt_test_rev_sleep_req (lt_handle_t *h) |
| Test Sleep_Req L2 request. | |
| void | lt_test_rev_startup_req (lt_handle_t *h) |
| Test L2 Startup Request. | |
| void | lt_test_rev_write_r_config (lt_handle_t *h) |
| Backs up R-Config, writes it and then restores it. | |
| void | lt_test_rev_ecc_key_generate (lt_handle_t *h) |
| Test ECC_Key_Generate command, along with ECC_Key_Read and ECC_Key_Erase. | |
| void | lt_test_rev_ecc_key_store (lt_handle_t *h) |
| Test ECC_Key_Store command, along with ECC_Key_Read and ECC_Key_Erase. | |
| void | lt_test_rev_random_value_get (lt_handle_t *h) |
| Tests Random_Value_Get command. | |
| void | lt_test_rev_mac_and_destroy (lt_handle_t *h) |
| Tests MAC_And_Destroy command using HMAC-SHA256 as the Key Derivation Function (KDF). | |
| void | lt_test_rev_get_log_req (lt_handle_t *h) |
| Tests Get_Log_Req command in Application and Maintenance mode. | |
Variables | |
| lt_ret_t(* | lt_test_cleanup_function )(void) |