mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-22 18:39:58 +00:00
Using VIA_MD_OR_PSA_BASED_ON_USE_PSA was justified by the fact that until a few commits ago, the test functions here computed hashes using either MD or PSA, depending on whether USE_PSA was defined (which itself was justified by the loose reasoning that "PK is USE_PSA territory"). A few commits ago, test code stopped computing hashes because the hash values became part of the test data. PK itself does not compute hashes. As a result, VIA_MD_OR_PSA_BASED_ON_USE_PSA is no longer justified. There are now two kinds of tests: - those that only rely on hash data (ECDSA, RSA PKCS#1 v1.5) should depend on VIA_LOWLEVEL_OR_PSA as that is the minimal dependency, hence the one used for data - those that were the layer below PK will internally compute a hash (RSA PKCS#1 v2.1): currently this hash is always computed using MD (on which MBEDTLS_PKCS1_V21 depends), so legacy dependencies like MBEDTLS_SHA256_C should be used for now. The previous dependency was morally wrong, it didn't show in the driver-only tests only because PKCS#1 v2.1 is disabled in this test for now. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>