Removed old vendor keytype usage
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index aa4ab73..b0b03a0 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -2488,7 +2488,6 @@
switch( key_type )
{
case PSA_KEY_TYPE_AES:
- case PSA_KEY_TYPE_AES_VENDOR:
cipher_id_tmp = MBEDTLS_CIPHER_ID_AES;
break;
case PSA_KEY_TYPE_DES:
@@ -3416,9 +3415,9 @@
if (PSA_KEY_LIFETIME_IS_VENDOR_DEFINED(slot->attr.lifetime))
{
status = psa_asymmetric_sign_vendor(slot,alg,
- hash, hash_length,
- signature, signature_size,
- signature_length );
+ hash, hash_length,
+ signature, signature_size,
+ signature_length );
}
else
#if defined(MBEDTLS_RSA_C)
@@ -3540,8 +3539,8 @@
if (PSA_KEY_LIFETIME_IS_VENDOR_DEFINED(slot->attr.lifetime))
{
return( psa_asymmetric_verify_vendor(slot,alg,
- hash, hash_length,
- signature, signature_length ) );
+ hash, hash_length,
+ signature, signature_length ) );
}
else
#if defined(MBEDTLS_RSA_C)
@@ -3829,6 +3828,8 @@
if (PSA_KEY_LIFETIME_IS_VENDOR_DEFINED(slot->attr.lifetime))
{
status = psa_cipher_setup_vendor(operation, handle, alg);
+ if( status != PSA_SUCCESS )
+ goto exit;
}
#if defined(MBEDTLS_DES_C)
@@ -3885,12 +3886,6 @@
operation->iv_size = 12;
#endif
- if (PSA_KEY_LIFETIME_IS_VENDOR_DEFINED(slot->attr.lifetime))
- {
- status = psa_cipher_setup_vendor(operation, handle, alg);
- }
-
-
exit:
if( status == 0 )
status = mbedtls_to_psa_error( ret );
diff --git a/library/psa_crypto_core.h b/library/psa_crypto_core.h
index 63d1e8a..4654405 100644
--- a/library/psa_crypto_core.h
+++ b/library/psa_crypto_core.h
@@ -39,7 +39,7 @@
*/
typedef struct
{
- psa_core_key_attributes_t attr;
+ psa_core_key_attributes_t attr;
union
{
/* Raw-data key (key_type_is_raw_bytes() in psa_crypto.c) */