Skip to content

Commit

Permalink
Fix build of v3.6 with unset MBEDTLS_DHM_C but MBEDTLS_USE_PSA_CRYPTO…
Browse files Browse the repository at this point in the history
… set (fixes Mbed-TLS#9188)

Avoid compiler warning about size comparison (like in commit 7910cdd):

Clang builds fail, warning about comparing uint8_t to a size that may be >255.

Signed-off-by: Michael Schuster <michael@schuster.ms>
  • Loading branch information
misch7 committed Jul 24, 2024
1 parent 830d704 commit 2d814cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog.d/fix-clang-psa-build-without-dhm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix
* Fix Clang compilation error when MBEDTLS_USE_PSA_CRYPTO is enabled
but MBEDTLS_DHM_C is disabled. Reported by Michael Schuster in #9188.
2 changes: 1 addition & 1 deletion library/ssl_tls12_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3921,7 +3921,7 @@ static int ssl_parse_client_key_exchange(mbedtls_ssl_context *ssl)
#if defined(MBEDTLS_USE_PSA_CRYPTO)
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
psa_status_t destruction_status = PSA_ERROR_CORRUPTION_DETECTED;
uint8_t ecpoint_len;
size_t ecpoint_len;

mbedtls_ssl_handshake_params *handshake = ssl->handshake;

Expand Down

0 comments on commit 2d814cc

Please sign in to comment.