mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-10-26 04:47:31 +00:00
In tests of mbedtls_cipher_xxx and mbedtls_pk_xxx with MBEDTLS_USE_PSA_CRYPTO enabled, initialize and deinitialize the PSA subsystem in every function. Before, the tests were only passing because the first function to be called happened to call psa_crypto_init() but not mbedtls_psa_crypto_free(). In some configurations (not tested on CI), psa_crypto_init() was not called so the tests using PSA failed. Call PSA_DONE() at the end of each test function. This ensures that no resources are leaked in the form of PSA crypto slot contents. Incidentally, this also fixes a build error due to test_helper_psa_done() being unused in test_suite_pk: the fact that it wasn't used betrayed the missing calls to PSA_DONE(). |
||
|---|---|---|
| .. | ||
| .jenkins | ||
| data_files | ||
| docker/bionic | ||
| git-scripts | ||
| scripts | ||
| suites | ||
| .gitignore | ||
| CMakeLists.txt | ||
| Descriptions.txt | ||
| make-in-docker.sh | ||
| Makefile | ||
| psa_crypto_helpers.h | ||
| psa_helpers.h | ||