mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-04 06:40:03 +00:00
Change some conditionals of PSA to use BUILTIN
Change a few conditionals in the psa library to be based on the MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES instead of the WANT macros. Future additions of HW acceleration will need to be mindful of these definitions if any of this code is needed in those instances. Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
parent
db01e0271f
commit
12ca50307f
@ -3875,7 +3875,7 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
|
||||
if( ret != 0 )
|
||||
goto exit;
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_DES)
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES)
|
||||
if( slot->attr.type == PSA_KEY_TYPE_DES && key_bits == 128 )
|
||||
{
|
||||
/* Two-key Triple-DES is 3-key Triple-DES with K1=K3 */
|
||||
@ -5095,7 +5095,7 @@ static psa_status_t psa_generate_derived_key_internal(
|
||||
status = psa_key_derivation_output_bytes( operation, data, bytes );
|
||||
if( status != PSA_SUCCESS )
|
||||
goto exit;
|
||||
#if defined(PSA_WANT_KEY_TYPE_DES)
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES)
|
||||
if( slot->attr.type == PSA_KEY_TYPE_DES )
|
||||
psa_des_set_key_parity( data, bytes );
|
||||
#endif /* PSA_WANT_KEY_TYPE_DES */
|
||||
@ -6029,7 +6029,7 @@ psa_status_t psa_generate_key_internal(
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_DES)
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES)
|
||||
if( type == PSA_KEY_TYPE_DES )
|
||||
psa_des_set_key_parity( key_buffer, key_buffer_size );
|
||||
#endif /* MBEDTLS_DES_C */
|
||||
|
Loading…
x
Reference in New Issue
Block a user