unbreak MbedTLS in Linux

This commit is contained in:
Sergio R. Caprile 2024-05-16 09:55:01 -03:00
parent ac0e6f3377
commit 16a0c89d5f

View File

@ -105,8 +105,9 @@ void mg_tls_init(struct mg_connection *c, const struct mg_tls_opts *opts) {
if (c->is_listening) goto fail; if (c->is_listening) goto fail;
MG_DEBUG(("%lu Setting TLS", c->id)); MG_DEBUG(("%lu Setting TLS", c->id));
MG_PROF_ADD(c, "mbedtls_init_start"); MG_PROF_ADD(c, "mbedtls_init_start");
#if defined(MBEDTLS_PSA_CRYPTO_C) #if defined(MBEDTLS_VERSION_NUMBER) && MBEDTLS_VERSION_NUMBER >= 0x03000000 && \
psa_crypto_init(); defined(MBEDTLS_PSA_CRYPTO_C)
psa_crypto_init(); // https://github.com/Mbed-TLS/mbedtls/issues/9072#issuecomment-2084845711
#endif #endif
mbedtls_ssl_init(&tls->ssl); mbedtls_ssl_init(&tls->ssl);
mbedtls_ssl_config_init(&tls->conf); mbedtls_ssl_config_init(&tls->conf);