Merge pull request #4878 from SiliconLabs/remove_dependency_4877

Remove dependency of built-in keys on storage
This commit is contained in:
Gilles Peskine 2021-09-20 22:20:16 +02:00 committed by GitHub
commit 93cb6111ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -479,7 +479,8 @@ psa_status_t psa_validate_key_persistence( psa_key_lifetime_t lifetime )
psa_status_t psa_open_key( mbedtls_svc_key_id_t key, psa_key_handle_t *handle ) psa_status_t psa_open_key( mbedtls_svc_key_id_t key, psa_key_handle_t *handle )
{ {
#if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) #if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) || \
defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS)
psa_status_t status; psa_status_t status;
psa_key_slot_t *slot; psa_key_slot_t *slot;
@ -497,11 +498,11 @@ psa_status_t psa_open_key( mbedtls_svc_key_id_t key, psa_key_handle_t *handle )
return( psa_unlock_key_slot( slot ) ); return( psa_unlock_key_slot( slot ) );
#else /* defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) */ #else /* MBEDTLS_PSA_CRYPTO_STORAGE_C || MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS */
(void) key; (void) key;
*handle = PSA_KEY_HANDLE_INIT; *handle = PSA_KEY_HANDLE_INIT;
return( PSA_ERROR_NOT_SUPPORTED ); return( PSA_ERROR_NOT_SUPPORTED );
#endif /* !defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) */ #endif /* MBEDTLS_PSA_CRYPTO_STORAGE_C || MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS */
} }
psa_status_t psa_close_key( psa_key_handle_t handle ) psa_status_t psa_close_key( psa_key_handle_t handle )

View file

@ -160,7 +160,7 @@ depends_on:MBEDTLS_PSA_CRYPTO_STORAGE_C
create_fail:PSA_KEY_LIFETIME_PERSISTENT:PSA_KEY_ID_USER_MAX + 1:PSA_ERROR_INVALID_ARGUMENT create_fail:PSA_KEY_LIFETIME_PERSISTENT:PSA_KEY_ID_USER_MAX + 1:PSA_ERROR_INVALID_ARGUMENT
Open not supported Open not supported
depends_on:!MBEDTLS_PSA_CRYPTO_STORAGE_C depends_on:!MBEDTLS_PSA_CRYPTO_STORAGE_C:!MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS
open_fail:1:PSA_ERROR_NOT_SUPPORTED open_fail:1:PSA_ERROR_NOT_SUPPORTED
Create not supported Create not supported