diff --git a/library/psa_crypto_driver_wrappers.c b/library/psa_crypto_driver_wrappers.c index fd03ed2bf..1eb9ebe80 100644 --- a/library/psa_crypto_driver_wrappers.c +++ b/library/psa_crypto_driver_wrappers.c @@ -501,7 +501,9 @@ psa_status_t psa_driver_wrapper_export_key( { if( ( drv->key_management == NULL ) || ( drv->key_management->p_export == NULL ) ) + { return( PSA_ERROR_NOT_SUPPORTED ); + } return( drv->key_management->p_export( drv_context, @@ -557,7 +559,9 @@ psa_status_t psa_driver_wrapper_export_public_key( { if( ( drv->key_management == NULL ) || ( drv->key_management->p_export_public == NULL ) ) + { return( PSA_ERROR_NOT_SUPPORTED ); + } return( drv->key_management->p_export_public( drv_context,