File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -746,10 +746,11 @@ psa_status_t psa_import_key_into_slot( psa_key_slot_t *slot,
746
746
if ( key_type_is_raw_bytes ( slot -> attr .type ) )
747
747
{
748
748
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. */
750
750
if ( data_length > SIZE_MAX / 8 )
751
751
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. */
753
754
if ( bit_size > PSA_MAX_KEY_BITS )
754
755
return ( PSA_ERROR_NOT_SUPPORTED );
755
756
status = prepare_raw_data_slot ( slot -> attr .type , bit_size ,
You can’t perform that action at this time.
0 commit comments