mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-10-28 18:07:34 +08:00
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> |
||
|---|---|---|
| .. | ||
| .jenkins | ||
| configs | ||
| git-scripts | ||
| include/test | ||
| opt-testcases | ||
| scripts | ||
| src | ||
| suites | ||
| .gitignore | ||
| CMakeLists.txt | ||
| compat-in-docker.sh | ||
| compat.sh | ||
| context-info.sh | ||
| Descriptions.txt | ||
| make-in-docker.sh | ||
| Makefile | ||
| ssl-opt.sh | ||