Skip to content

Commit 1b9505c

Browse files
Correct some comments
1 parent 8908c5e commit 1b9505c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/psa_crypto.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,10 +746,11 @@ psa_status_t psa_import_key_into_slot( psa_key_slot_t *slot,
746746
if( key_type_is_raw_bytes( slot->attr.type ) )
747747
{
748748
size_t bit_size = PSA_BYTES_TO_BITS( data_length );
749-
/* Ensure that the bytes-to-bit conversion doesn't overflow. */
749+
/* Ensure that the bytes-to-bit conversion didn't overflow. */
750750
if( data_length > SIZE_MAX / 8 )
751751
return( PSA_ERROR_NOT_SUPPORTED );
752-
/* Ensure that the bit size fits in its representation type. */
752+
/* Enforce a size limit, and in particular ensure that the bit
753+
* size fits in its representation type. */
753754
if( bit_size > PSA_MAX_KEY_BITS )
754755
return( PSA_ERROR_NOT_SUPPORTED );
755756
status = prepare_raw_data_slot( slot->attr.type, bit_size,

0 commit comments

Comments
 (0)