Add pbkdf2 to psa_key_derivation_abort
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
This commit is contained in:
parent
3128c5d9ce
commit
f5fedf1e0d
1 changed files with 19 additions and 0 deletions
|
@ -5094,6 +5094,25 @@ psa_status_t psa_key_derivation_abort(psa_key_derivation_operation_t *operation)
|
|||
sizeof(operation->ctx.tls12_ecjpake_to_pms.data));
|
||||
} else
|
||||
#endif /* defined(MBEDTLS_PSA_BUILTIN_ALG_TLS12_ECJPAKE_TO_PMS) */
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_ALG_PBKDF2_HMAC)
|
||||
if (PSA_ALG_IS_PBKDF2_HMAC(kdf_alg)) {
|
||||
if (operation->ctx.pbkdf2.input_cost != 0U) {
|
||||
operation->ctx.pbkdf2.input_cost = 0U;
|
||||
}
|
||||
if (operation->ctx.pbkdf2.salt != NULL) {
|
||||
mbedtls_platform_zeroize(operation->ctx.pbkdf2.salt,
|
||||
operation->ctx.pbkdf2.salt_length);
|
||||
mbedtls_free(operation->ctx.pbkdf2.salt);
|
||||
}
|
||||
if (operation->ctx.pbkdf2.password != NULL) {
|
||||
mbedtls_platform_zeroize(operation->ctx.pbkdf2.password,
|
||||
operation->ctx.pbkdf2.password_length);
|
||||
mbedtls_free(operation->ctx.pbkdf2.password);
|
||||
}
|
||||
|
||||
status = PSA_SUCCESS;
|
||||
} else
|
||||
#endif /* defined(MBEDTLS_PSA_BUILTIN_ALG_PBKDF2_HMAC) */
|
||||
{
|
||||
status = PSA_ERROR_BAD_STATE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue