Fix code style

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2023-02-23 17:28:23 +01:00
parent bdc21e623e
commit 083745e097
5 changed files with 23 additions and 16 deletions

View file

@ -48,7 +48,8 @@ typedef struct {
size_t forced_output_length;
} mbedtls_test_driver_pake_hooks_t;
#define MBEDTLS_TEST_DRIVER_PAKE_INIT { PSA_SUCCESS, PSA_SUCCESS, {0, 0, 0, 0, 0, 0}, PSA_SUCCESS, NULL, 0 }
#define MBEDTLS_TEST_DRIVER_PAKE_INIT { PSA_SUCCESS, PSA_SUCCESS, { 0, 0, 0, 0, 0, 0 }, PSA_SUCCESS, \
NULL, 0 }
static inline mbedtls_test_driver_pake_hooks_t
mbedtls_test_driver_pake_hooks_init(void)
{

View file

@ -3050,7 +3050,8 @@ void pake_operations(data_t *pw_data, int forced_status_setup_arg, int forced_st
/* --- psa_pake_input (driver: setup, input) --- */
mbedtls_test_driver_pake_hooks.forced_setup_status = forced_status_setup;
mbedtls_test_driver_pake_hooks.forced_status = forced_status;
memset(&mbedtls_test_driver_pake_hooks.hits, 0, sizeof(mbedtls_test_driver_pake_hooks.hits));
memset(&mbedtls_test_driver_pake_hooks.hits, 0,
sizeof(mbedtls_test_driver_pake_hooks.hits));
TEST_EQUAL(psa_pake_input(&operation, PSA_PAKE_STEP_KEY_SHARE,
input_buffer, size_key_share),
expected_status);
@ -3062,7 +3063,8 @@ void pake_operations(data_t *pw_data, int forced_status_setup_arg, int forced_st
/* --- psa_pake_output (driver: setup, output) --- */
mbedtls_test_driver_pake_hooks.forced_setup_status = forced_status_setup;
mbedtls_test_driver_pake_hooks.forced_status = forced_status;
memset(&mbedtls_test_driver_pake_hooks.hits, 0, sizeof(mbedtls_test_driver_pake_hooks.hits));
memset(&mbedtls_test_driver_pake_hooks.hits, 0,
sizeof(mbedtls_test_driver_pake_hooks.hits));
TEST_EQUAL(psa_pake_output(&operation, PSA_PAKE_STEP_KEY_SHARE,
output_buffer, output_size, &output_len),
expected_status);
@ -3074,7 +3076,8 @@ void pake_operations(data_t *pw_data, int forced_status_setup_arg, int forced_st
/* --- psa_pake_input (driver: setup, input, (abort)) --- */
mbedtls_test_driver_pake_hooks.forced_setup_status = forced_status_setup;
mbedtls_test_driver_pake_hooks.forced_status = forced_status;
memset(&mbedtls_test_driver_pake_hooks.hits, 0, sizeof(mbedtls_test_driver_pake_hooks.hits));
memset(&mbedtls_test_driver_pake_hooks.hits, 0,
sizeof(mbedtls_test_driver_pake_hooks.hits));
TEST_EQUAL(psa_pake_input(&operation, PSA_PAKE_STEP_KEY_SHARE,
input_buffer, size_key_share),
expected_status);
@ -3088,7 +3091,8 @@ void pake_operations(data_t *pw_data, int forced_status_setup_arg, int forced_st
/* --- psa_pake_output (driver: setup, output, (abort)) --- */
mbedtls_test_driver_pake_hooks.forced_setup_status = forced_status_setup;
mbedtls_test_driver_pake_hooks.forced_status = forced_status;
memset(&mbedtls_test_driver_pake_hooks.hits, 0, sizeof(mbedtls_test_driver_pake_hooks.hits));
memset(&mbedtls_test_driver_pake_hooks.hits, 0,
sizeof(mbedtls_test_driver_pake_hooks.hits));
if (forced_output->len > 0) {
mbedtls_test_driver_pake_hooks.forced_output = forced_output->x;
mbedtls_test_driver_pake_hooks.forced_output_length = forced_output->len;
@ -3123,7 +3127,8 @@ void pake_operations(data_t *pw_data, int forced_status_setup_arg, int forced_st
/* --- psa_pake_get_implicit_key --- */
mbedtls_test_driver_pake_hooks.forced_status = forced_status;
memset(&mbedtls_test_driver_pake_hooks.hits, 0, sizeof(mbedtls_test_driver_pake_hooks.hits));
memset(&mbedtls_test_driver_pake_hooks.hits, 0,
sizeof(mbedtls_test_driver_pake_hooks.hits));
TEST_EQUAL(psa_pake_get_implicit_key(&operation, &implicit_key),
expected_status);
TEST_EQUAL(mbedtls_test_driver_pake_hooks.hits.total, 2);
@ -3140,7 +3145,8 @@ void pake_operations(data_t *pw_data, int forced_status_setup_arg, int forced_st
/* --- psa_pake_abort --- */
mbedtls_test_driver_pake_hooks.forced_status = forced_status;
memset(&mbedtls_test_driver_pake_hooks.hits, 0, sizeof(mbedtls_test_driver_pake_hooks.hits));
memset(&mbedtls_test_driver_pake_hooks.hits, 0,
sizeof(mbedtls_test_driver_pake_hooks.hits));
TEST_EQUAL(psa_pake_abort(&operation), expected_status);
TEST_EQUAL(mbedtls_test_driver_pake_hooks.hits.total, 1);
TEST_EQUAL(mbedtls_test_driver_pake_hooks.hits.abort, 1);