Merge pull request #2755 from cesanta/mbed

unbreak MbedTLS in Linux
This commit is contained in:
Sergio R. Caprile 2024-05-16 10:09:59 -03:00 committed by GitHub
commit dd883c0563
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;
MG_DEBUG(("%lu Setting TLS", c->id));
MG_PROF_ADD(c, "mbedtls_init_start");
#if defined(MBEDTLS_PSA_CRYPTO_C)
psa_crypto_init();
#if defined(MBEDTLS_VERSION_NUMBER) && MBEDTLS_VERSION_NUMBER >= 0x03000000 && \
defined(MBEDTLS_PSA_CRYPTO_C)
psa_crypto_init(); // https://github.com/Mbed-TLS/mbedtls/issues/9072#issuecomment-2084845711
#endif
mbedtls_ssl_init(&tls->ssl);
mbedtls_ssl_config_init(&tls->conf);