mbedtls/tests
Gilles Peskine bdf309ccdb Convert the PSA crypto cryptography tests to the new handle API
Switch from the direct use of slot numbers to handles allocated by
psa_allocate_key.

This commit does not affect persistent key tests except for the one
test function in test_suite_psa_crypto that uses persistent keys
(persistent_key_load_key_from_storage).

The general principle for each function is:
* Change `psa_key_slot_t slot` to `psa_key_handle_t handle`.
* Call psa_allocate_key() before setting the policy of the slot,
  or before creating key material in functions that don't set a policy.
* Some PSA_ERROR_EMPTY_SLOT errors become PSA_ERROR_INVALID_HANDLE
  because there is now a distinction between not having a valid
  handle, and having a valid handle to a slot that doesn't contain key
  material.
* In tests that use symmetric keys, calculate the max_bits parameters
  of psa_allocate_key() from the key data size. In tests where the key
  may be asymmetric, call an auxiliary macro KEY_BITS_FROM_DATA which
  returns an overapproximation. There's no good way to find a good
  value for max_bits with the API, I think the API should be tweaked.
2018-12-11 16:48:13 +01:00
..
.jenkins Add a Jenkinsfile for PR job testing 2018-10-19 16:41:54 +01:00
data_files Add tests for relaxed CRL-CA name comparison 2018-11-05 11:47:49 +00:00
git-scripts Add check-files.py to pre-push.sh 2018-05-21 11:41:18 +01:00
scripts Refer to PSA through MBEDTLS_USE_PSA_CRYPTO, not USE_PSA, in all.sh 2018-11-22 16:27:57 +00:00
suites Convert the PSA crypto cryptography tests to the new handle API 2018-12-11 16:48:13 +01:00
.gitignore Move some ignore patterns to subdirectories 2015-01-28 15:33:23 +00:00
CMakeLists.txt Add tests for the new slot management mechanism 2018-12-11 16:48:12 +01:00
compat.sh Add ChachaPoly ciphersuites to compat.sh 2018-06-19 13:16:30 +02:00
Descriptions.txt Add selftest program to the list of tests 2014-04-04 16:33:01 +02:00
Makefile Add library as valid header file location 2018-11-20 15:21:22 +00:00
ssl-opt.sh Merge branch 'psa_cipher_integration_CRYPTO' into feature-psa-tls-integration-proposed 2018-11-23 15:59:26 +00:00