v1rtu3x fe0c44827a Fix X.509 certificate profiles to honor MBEDTLS_PK_SIGALG_ECDSA
When verifying a certificate against a custom mbedtls_x509_crt_profile,
the profile check for allowed PK algorithms used a direct cast from
mbedtls_pk_type_t to mbedtls_pk_sigalg_t. These two enums have
different numerical values, so an ECKEY certificate (pk_type=2) was
incorrectly matched against MBEDTLS_PK_SIGALG_RSA_PSS (sigalg=2)
instead of MBEDTLS_PK_SIGALG_ECDSA (sigalg=3).

Add a translation helper x509_pk_type_to_sigalg() that maps internal
pk_type values to the public sigalg values used in profiles.

Fixes #10849
Fixes #10747

(cherry picked from commit dbcbf281520597bba65a117d00889cb7bb93aacf)
Signed-off-by: v1rtu3x <149050962+v1rtu3x@users.noreply.github.com>
2026-09-29 15:24:16 +03:00
..
.jenkins
configs Remove deprecated items 2025-08-01 11:45:14 +01:00
git-scripts Header updates 2023-11-03 12:21:36 +00:00
include/test Merge pull request #10938 from gilles-peskine-arm/threading-1.0-alt-build-mbedtls 2026-09-01 11:00:13 +02:00
opt-testcases Do not check fail cases for verify skipped 2026-03-13 18:04:16 +00:00
scripts depends.py: add PSA_WANT_ALG_RSA_PSS to pkalgs domain 2026-09-25 09:14:09 +02:00
src tests: ssl_helpers: run ssl_context reset check only when the SSL context is setup 2026-06-24 15:38:32 +02:00
suites Fix X.509 certificate profiles to honor MBEDTLS_PK_SIGALG_ECDSA 2026-09-29 15:24:16 +03:00
.gitignore cmake: Generate test_keys.h and test_certs.h in the build tree 2025-03-26 21:19:28 +01:00
CMakeLists.txt cmake: Introduce TF_PSA_CRYPTO_PRIVATE_INCLUDE_DIRS 2026-03-09 08:28:51 +01:00
compat-in-docker.sh Header updates 2023-11-03 12:21:36 +00:00
compat.sh tests: remove remaining FFDH code in compat.sh 2026-04-21 10:33:54 +01:00
context-info.sh Fix test and formatting in ssl_context_info 2025-04-29 22:02:24 +02:00
Descriptions.txt
make-in-docker.sh Header updates 2023-11-03 12:21:36 +00:00
Makefile Remove PSA status coverage log test 2026-03-12 10:18:33 +01:00
ssl-opt.sh fix typo 2026-07-15 09:48:06 +01:00