mbedtls/tests
Gilles Peskine f7b4137e69 Untangle PSA_ALG_IS_HASH_AND_SIGN and PSA_ALG_IS_SIGN_HASH
The current definition of PSA_ALG_IS_HASH_AND_SIGN includes
PSA_ALG_RSA_PKCS1V15_SIGN_RAW and PSA_ALG_ECDSA_ANY, which don't strictly
follow the hash-and-sign paradigm: the algorithm does not encode a hash
algorithm that is applied prior to the signature step. The definition in
fact encompasses what can be used with psa_sign_hash/psa_verify_hash, so
it's the correct definition for PSA_ALG_IS_SIGN_HASH. Therefore this commit
moves definition of PSA_ALG_IS_HASH_AND_SIGN to PSA_ALG_IS_SIGN_HASH, and
replace the definition of PSA_ALG_IS_HASH_AND_SIGN by a correct one (based
on PSA_ALG_IS_SIGN_HASH, excluding the algorithms where the pre-signature
step isn't to apply the hash encoded in the algorithm).

In the definition of PSA_ALG_SIGN_GET_HASH, keep the condition for a nonzero
output to be PSA_ALG_IS_HASH_AND_SIGN.

Everywhere else in the code base (definition of PSA_ALG_IS_SIGN_MESSAGE, and
every use of PSA_ALG_IS_HASH_AND_SIGN outside of crypto_values.h), we meant
PSA_ALG_IS_SIGN_HASH where we wrote PSA_ALG_IS_HASH_AND_SIGN, so do a
global replacement.
```
git grep -l IS_HASH_AND_SIGN ':!include/psa/crypto_values.h' | xargs perl -i -pe 's/ALG_IS_HASH_AND_SIGN/ALG_IS_SIGN_HASH/g'
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-03 15:48:15 +01:00
..
.jenkins
configs Move long -D lists from all.sh to a header file 2021-09-20 19:20:04 +02:00
data_files Removal of RC4 certs and fixes to docs and tests 2021-06-21 13:27:29 +02:00
docker/bionic Upgrade gnutls-next to 3.7.2 2021-09-02 17:31:10 +08:00
git-scripts Update scripts to use check-names.py 2021-08-06 21:04:32 +01:00
include Show values when TEST_EQUAL fails 2021-10-19 22:32:44 +02:00
scripts Merge pull request #5116 from gilles-peskine-arm/remove-greentea-3.0 2021-10-29 09:33:34 +02:00
src Untangle PSA_ALG_IS_HASH_AND_SIGN and PSA_ALG_IS_SIGN_HASH 2021-11-03 15:48:15 +01:00
suites Untangle PSA_ALG_IS_HASH_AND_SIGN and PSA_ALG_IS_SIGN_HASH 2021-11-03 15:48:15 +01:00
.gitignore Ignore generated source files that are no longer checked in 2021-05-20 10:37:22 +02:00
CMakeLists.txt Rename DEV_MODE to GEN_FILES 2021-10-25 13:16:04 +01:00
compat-in-docker.sh Upgrade gnutls-next to 3.7.2 2021-09-02 17:31:10 +08:00
compat.sh Improve comments to be more accurate 2021-09-03 13:19:57 +01:00
context-info.sh Modifies tests in context-info.sh 2021-06-16 16:19:53 +01:00
Descriptions.txt Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +01:00
make-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
Makefile Remove on-target testing 2021-10-27 11:45:57 +02:00
ssl-opt-in-docker.sh Upgrade gnutls-next to 3.7.2 2021-09-02 17:31:10 +08:00
ssl-opt.sh Add certificate success check 2021-10-29 10:18:50 +08:00