mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 22:55:39 +01:00
Correct some comments
This commit is contained in:
parent
8908c5e81c
commit
1b9505c451
@ -746,10 +746,11 @@ psa_status_t psa_import_key_into_slot( psa_key_slot_t *slot,
|
||||
if( key_type_is_raw_bytes( slot->attr.type ) )
|
||||
{
|
||||
size_t bit_size = PSA_BYTES_TO_BITS( data_length );
|
||||
/* Ensure that the bytes-to-bit conversion doesn't overflow. */
|
||||
/* Ensure that the bytes-to-bit conversion didn't overflow. */
|
||||
if( data_length > SIZE_MAX / 8 )
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
/* Ensure that the bit size fits in its representation type. */
|
||||
/* Enforce a size limit, and in particular 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->attr.type, bit_size,
|
||||
|
Loading…
Reference in New Issue
Block a user