1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-09-11 12:10:46 +03:00

Implement, plug in and test validate_key driver entry point

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
Steven Cooreman
2020-10-13 17:43:44 +02:00
parent 398aee5742
commit 0452476eac
7 changed files with 208 additions and 4 deletions

View File

@@ -977,6 +977,7 @@ psa_status_t psa_import_key_into_slot( psa_key_slot_t *slot,
size_t data_length )
{
psa_status_t status = PSA_SUCCESS;
size_t bit_size;
/* zero-length keys are never supported. */
if( data_length == 0 )
@@ -984,7 +985,7 @@ 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 );
bit_size = PSA_BYTES_TO_BITS( data_length );
/* Ensure that the bytes-to-bits conversion hasn't overflown. */
if( data_length > SIZE_MAX / 8 )