Removed old vendor keytype usage
diff --git a/include/psa/crypto_values.h b/include/psa/crypto_values.h
index ad6f8fa..1227326 100644
--- a/include/psa/crypto_values.h
+++ b/include/psa/crypto_values.h
@@ -380,14 +380,6 @@
  */
 #define PSA_KEY_TYPE_AES ((psa_key_type_t)0x40000001)
 
-/** Vendor defined Key format for a cipher, AEAD or MAC algorithm based
- *  on the AES block cipher.
- *
- * The size of the key can be 16 bytes (AES-128), 24 bytes (AES-192) or
- * 32 bytes (AES-256).
- */
-#define PSA_KEY_TYPE_AES_VENDOR ((psa_key_type_t)(PSA_KEY_TYPE_VENDOR_FLAG | PSA_KEY_TYPE_AES))
-
 /** Whether a key type is AES. */
 #define PSA_KEY_TYPE_IS_AES(type) (((type)&PSA_KEY_TYPE_AES) != 0)
 
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) */