Fix code style

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2023-03-06 14:21:44 +01:00
parent 09104b8712
commit aa1834254e
2 changed files with 12 additions and 12 deletions

View File

@ -8009,7 +8009,7 @@ psa_status_t psa_pake_abort(
if (operation->stage == PSA_PAKE_OPERATION_STAGE_COLLECT_INPUTS) {
if (operation->data.inputs.password != NULL) {
mbedtls_platform_zeroize(operation->data.inputs.password,
operation->data.inputs.password_len);
operation->data.inputs.password_len);
mbedtls_free(operation->data.inputs.password);
}
if (operation->data.inputs.user != NULL) {

View File

@ -560,8 +560,8 @@ void ecjpake_setup(int alg_arg, int key_type_pw_arg, int key_usage_pw_arg,
unsigned char *output_buffer = NULL;
size_t output_len = 0;
const uint8_t password[] = "abcd";
uint8_t *user = (uint8_t*)user_arg;
uint8_t *peer = (uint8_t*)peer_arg;
uint8_t *user = (uint8_t *) user_arg;
uint8_t *peer = (uint8_t *) peer_arg;
size_t user_len = strlen(user_arg);
size_t peer_len = strlen(peer_arg);
@ -616,13 +616,13 @@ void ecjpake_setup(int alg_arg, int key_type_pw_arg, int key_usage_pw_arg,
ERR_INJECT_SET_ROLE);
SETUP_ALWAYS_CHECK_STEP(psa_pake_set_role(&operation, PSA_PAKE_ROLE_NONE),
ERR_IN_SET_ROLE);
ERR_IN_SET_ROLE);
SETUP_ALWAYS_CHECK_STEP(psa_pake_set_user(&operation, user, user_len),
ERR_IN_SET_USER);
ERR_IN_SET_USER);
SETUP_ALWAYS_CHECK_STEP(psa_pake_set_peer(&operation, peer, peer_len),
ERR_IN_SET_PEER);
ERR_IN_SET_PEER);
SETUP_CONDITIONAL_CHECK_STEP(psa_pake_set_user(&operation, user, user_len),
ERR_DUPLICATE_SET_USER);
@ -1109,9 +1109,9 @@ void pake_input_getters_user()
PSA_ERROR_BUFFER_TOO_SMALL);
TEST_EQUAL(psa_crypto_driver_pake_get_user(&operation.data.inputs,
(uint8_t *) &user_ret,
user_len_ret,
&buffer_len_ret),
(uint8_t *) &user_ret,
user_len_ret,
&buffer_len_ret),
PSA_SUCCESS);
TEST_EQUAL(buffer_len_ret, user_len);
@ -1167,9 +1167,9 @@ void pake_input_getters_peer()
PSA_ERROR_BUFFER_TOO_SMALL);
TEST_EQUAL(psa_crypto_driver_pake_get_peer(&operation.data.inputs,
(uint8_t *) &peer_ret,
peer_len_ret,
&buffer_len_ret),
(uint8_t *) &peer_ret,
peer_len_ret,
&buffer_len_ret),
PSA_SUCCESS);
TEST_EQUAL(buffer_len_ret, peer_len);