mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-29 00:18:06 -04:00
Remove redundant code
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
dff21d3429
commit
6d77830c6a
@ -7508,11 +7508,7 @@ static psa_status_t psa_pake_complete_inputs(
|
||||
computation_stage->input_step = PSA_PAKE_STEP_X1_X2;
|
||||
computation_stage->output_step = PSA_PAKE_STEP_X1_X2;
|
||||
}
|
||||
} else {
|
||||
inputs.password_len = 0;
|
||||
inputs.password = NULL;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,6 @@ psa_status_t mbedtls_psa_pake_setup(mbedtls_psa_pake_operation_t *operation,
|
||||
operation->buffer_offset = 0;
|
||||
|
||||
status = psa_pake_ecjpake_setup(operation);
|
||||
|
||||
if (status != PSA_SUCCESS) {
|
||||
return status;
|
||||
}
|
||||
@ -503,8 +502,6 @@ psa_status_t mbedtls_psa_pake_get_implicit_key(
|
||||
memcpy(output, operation->buffer, operation->buffer_length);
|
||||
*output_size = operation->buffer_length;
|
||||
|
||||
mbedtls_platform_zeroize(operation->buffer, MBEDTLS_PSA_PAKE_BUFFER_SIZE);
|
||||
|
||||
return PSA_SUCCESS;
|
||||
} else
|
||||
#else
|
||||
@ -518,9 +515,7 @@ psa_status_t mbedtls_psa_pake_abort(mbedtls_psa_pake_operation_t *operation)
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE)
|
||||
|
||||
if (operation->alg == PSA_ALG_JPAKE) {
|
||||
if (operation->password_len > 0) {
|
||||
mbedtls_platform_zeroize(operation->password, operation->password_len);
|
||||
}
|
||||
mbedtls_platform_zeroize(operation->password, operation->password_len);
|
||||
mbedtls_free(operation->password);
|
||||
operation->password = NULL;
|
||||
operation->password_len = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user