Skip to content

Commit a58396e

Browse files
joerchande-nordic
authored andcommitted
[nrf fromlist] library: psa_crypto: Fix compilation error in psa_key_derivation_abort
Fix compilation error in psa_key_derivation_abort when MBEDTLS_PSA_BUILTIN_ALG_TLS12_PRF is defined, but MBEDTLS_PSA_BUILTIN_ALG_TLS12_PSK_TO_MS is not defined. In function 'psa_key_derivation_abort': error: 'psa_tls12_prf_key_derivation_t' {aka 'struct psa_tls12_prf_key_derivation_s'} has no member named 'other_secret' Upstream PR: Mbed-TLS/mbedtls#7125 Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no> (cherry picked from commit 87acf5b) (cherry picked from commit adea381)
1 parent 45374c0 commit a58396e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

library/psa_crypto.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4345,12 +4345,14 @@ psa_status_t psa_key_derivation_abort( psa_key_derivation_operation_t *operation
43454345
mbedtls_free( operation->ctx.tls12_prf.label );
43464346
}
43474347

4348+
#if defined(MBEDTLS_PSA_BUILTIN_ALG_TLS12_PSK_TO_MS)
43484349
if( operation->ctx.tls12_prf.other_secret != NULL )
43494350
{
43504351
mbedtls_platform_zeroize( operation->ctx.tls12_prf.other_secret,
43514352
operation->ctx.tls12_prf.other_secret_length );
43524353
mbedtls_free( operation->ctx.tls12_prf.other_secret );
43534354
}
4355+
#endif
43544356

43554357
status = PSA_SUCCESS;
43564358

0 commit comments

Comments
 (0)