Update key type name

Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
gabor-mezei-arm 2021-05-13 16:27:46 +02:00
parent f25c9767a9
commit c97b8ab0fd
No known key found for this signature in database
GPG Key ID: 106F5A41ECC305BD

View File

@ -28,7 +28,7 @@ void ecdsa_sign_hash( int force_status_arg,
PSA_ASSERT( psa_crypto_init( ) ); PSA_ASSERT( psa_crypto_init( ) );
psa_set_key_type( &attributes, psa_set_key_type( &attributes,
PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP_R1 ) ); PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_FAMILY_SECP_R1 ) );
psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH ); psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH );
psa_set_key_algorithm( &attributes, alg ); psa_set_key_algorithm( &attributes, alg );
psa_import_key( &attributes, psa_import_key( &attributes,
@ -86,7 +86,7 @@ void ecdsa_verify_hash( int force_status_arg,
if( register_public_key ) if( register_public_key )
{ {
psa_set_key_type( &attributes, psa_set_key_type( &attributes,
PSA_KEY_TYPE_ECC_PUBLIC_KEY( PSA_ECC_CURVE_SECP_R1 ) ); PSA_KEY_TYPE_ECC_PUBLIC_KEY( PSA_ECC_FAMILY_SECP_R1 ) );
psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_HASH ); psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_HASH );
psa_set_key_algorithm( &attributes, alg ); psa_set_key_algorithm( &attributes, alg );
psa_import_key( &attributes, psa_import_key( &attributes,
@ -96,7 +96,7 @@ void ecdsa_verify_hash( int force_status_arg,
else else
{ {
psa_set_key_type( &attributes, psa_set_key_type( &attributes,
PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP_R1 ) ); PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_FAMILY_SECP_R1 ) );
psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_HASH ); psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_HASH );
psa_set_key_algorithm( &attributes, alg ); psa_set_key_algorithm( &attributes, alg );
psa_import_key( &attributes, psa_import_key( &attributes,
@ -142,7 +142,7 @@ void ecdsa_sign_message( int force_status_arg,
PSA_ASSERT( psa_crypto_init( ) ); PSA_ASSERT( psa_crypto_init( ) );
psa_set_key_type( &attributes, psa_set_key_type( &attributes,
PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP_R1 ) ); PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_FAMILY_SECP_R1 ) );
psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_MESSAGE ); psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_MESSAGE );
psa_set_key_algorithm( &attributes, alg ); psa_set_key_algorithm( &attributes, alg );
psa_import_key( &attributes, psa_import_key( &attributes,
@ -202,7 +202,7 @@ void ecdsa_verify_message( int force_status_arg,
if( register_public_key ) if( register_public_key )
{ {
psa_set_key_type( &attributes, psa_set_key_type( &attributes,
PSA_KEY_TYPE_ECC_PUBLIC_KEY( PSA_ECC_CURVE_SECP_R1 ) ); PSA_KEY_TYPE_ECC_PUBLIC_KEY( PSA_ECC_FAMILY_SECP_R1 ) );
psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_MESSAGE ); psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_MESSAGE );
psa_set_key_algorithm( &attributes, alg ); psa_set_key_algorithm( &attributes, alg );
psa_import_key( &attributes, psa_import_key( &attributes,
@ -212,7 +212,7 @@ void ecdsa_verify_message( int force_status_arg,
else else
{ {
psa_set_key_type( &attributes, psa_set_key_type( &attributes,
PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP_R1 ) ); PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_FAMILY_SECP_R1 ) );
psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_MESSAGE ); psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_MESSAGE );
psa_set_key_algorithm( &attributes, alg ); psa_set_key_algorithm( &attributes, alg );
psa_import_key( &attributes, psa_import_key( &attributes,
@ -258,7 +258,7 @@ void generate_key( int force_status_arg,
mbedtls_test_driver_key_management_hooks_init(); mbedtls_test_driver_key_management_hooks_init();
psa_set_key_type( &attributes, psa_set_key_type( &attributes,
PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_CURVE_SECP_R1 ) ); PSA_KEY_TYPE_ECC_KEY_PAIR( PSA_ECC_FAMILY_SECP_R1 ) );
psa_set_key_bits( &attributes, 256 ); psa_set_key_bits( &attributes, 256 );
psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH | PSA_KEY_USAGE_EXPORT ); psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH | PSA_KEY_USAGE_EXPORT );
psa_set_key_algorithm( &attributes, alg ); psa_set_key_algorithm( &attributes, alg );