psa: driver: Reduce the scope of test driver entry points

Define test driver entry points that provide an alternative
to Mbed TLS driver entry points only when the PSA configuration
is used. Their purpose is only to test the PSA configuration
thus there is no good reason to use them out of this scope.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/library/psa_crypto_mac.h b/library/psa_crypto_mac.h
index ba32954..80a644b 100644
--- a/library/psa_crypto_mac.h
+++ b/library/psa_crypto_mac.h
@@ -277,7 +277,7 @@
  * BEYOND THIS POINT, TEST DRIVER ENTRY POINTS ONLY.
  */
 
-#if defined(PSA_CRYPTO_DRIVER_TEST)
+#if defined(PSA_CRYPTO_DRIVER_TEST) && defined(MBEDTLS_PSA_CRYPTO_CONFIG)
 
 psa_status_t mbedtls_transparent_test_driver_mac_compute(
     const psa_key_attributes_t *attributes,
@@ -323,6 +323,6 @@
 psa_status_t mbedtls_transparent_test_driver_mac_abort(
     mbedtls_psa_mac_operation_t *operation );
 
-#endif /* PSA_CRYPTO_DRIVER_TEST */
+#endif /* PSA_CRYPTO_DRIVER_TEST && MBEDTLS_PSA_CRYPTO_CONFIG */
 
 #endif /* PSA_CRYPTO_MAC_H */