mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Store key sizes in 16 bits in attributes
This is larger than the maximum key size introduced in the previous commit, by design. Make some room for flags (not used yet).
This commit is contained in:
@ -710,7 +710,7 @@ psa_status_t psa_import_key_into_slot( psa_key_slot_t *slot,
|
||||
/* Ensure that the bytes-to-bit conversion doesn't overflow. */
|
||||
if( data_length > SIZE_MAX / 8 )
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
/* Ensure that the key is not overly large. */
|
||||
/* Ensure that the bit size fits in its representation type. */
|
||||
if( bit_size > PSA_MAX_KEY_BITS )
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
status = prepare_raw_data_slot( slot->type, bit_size,
|
||||
|
Reference in New Issue
Block a user