diff --git a/vendor/curl/lib/config-linux.h b/vendor/curl/lib/config-linux.h index 02a1306ed0..b0084d92dd 100644 --- a/vendor/curl/lib/config-linux.h +++ b/vendor/curl/lib/config-linux.h @@ -869,7 +869,7 @@ /* #undef USE_MANUAL */ /* if mbedTLS is enabled */ -/* #undef USE_MBEDTLS */ +#define USE_MBEDTLS 1 /* if msh3 is in use */ /* #undef USE_MSH3 */ diff --git a/vendor/curl/lib/config-macos.h b/vendor/curl/lib/config-macos.h index bf5733fcca..c46b5ec014 100644 --- a/vendor/curl/lib/config-macos.h +++ b/vendor/curl/lib/config-macos.h @@ -869,7 +869,7 @@ /* #undef USE_MANUAL */ /* if mbedTLS is enabled */ -/* #undef USE_MBEDTLS */ +#define USE_MBEDTLS 1 /* if msh3 is in use */ /* #undef USE_MSH3 */ diff --git a/vendor/curl/lib/vtls/mbedtls.c b/vendor/curl/lib/vtls/mbedtls.c index ec0b10dd9a..1197d2956d 100644 --- a/vendor/curl/lib/vtls/mbedtls.c +++ b/vendor/curl/lib/vtls/mbedtls.c @@ -902,8 +902,6 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data) (struct mbed_ssl_backend_data *)connssl->backend; struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf); const mbedtls_x509_crt *peercert; - char cipher_str[64]; - uint16_t cipher_id; #ifndef CURL_DISABLE_PROXY const char * const pinnedpubkey = Curl_ssl_cf_is_proxy(cf)? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY]: @@ -932,11 +930,18 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data) return CURLE_SSL_CONNECT_ERROR; } - cipher_id = (uint16_t) - mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl); - mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true); - infof(data, "mbedTLS: Handshake complete, cipher is %s", cipher_str); - +#if MBEDTLS_VERSION_NUMBER >= 0x03020000 + { + char cipher_str[64]; + uint16_t cipher_id; + cipher_id = (uint16_t) + mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl); + mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true); + infof(data, "mbedTLS: Handshake complete, cipher is %s", cipher_str); + } +#else + infof(data, "mbedTLS: Handshake complete"); +#endif ret = mbedtls_ssl_get_verify_result(&backend->ssl); if(!conn_config->verifyhost) @@ -1506,4 +1511,4 @@ const struct Curl_ssl Curl_ssl_mbedtls = { mbed_send, /* send data to encrypt */ }; -#endif /* USE_MBEDTLS */ +#endif /* USE_MBEDTLS */ \ No newline at end of file diff --git a/vendor/curl/premake5.lua b/vendor/curl/premake5.lua index d86088f267..b3ac6a517f 100644 --- a/vendor/curl/premake5.lua +++ b/vendor/curl/premake5.lua @@ -32,6 +32,9 @@ project "curl" defines { "USE_SCHANNEL", "USE_WINDOWS_SSPI", "USE_WIN32_IDN" } links { "crypt32", "Normaliz" } + filter { "system:not windows" } + defines { "USE_MBEDTLS" } + filter { "system:linux or bsd or macosx" } defines { "CURL_HIDDEN_SYMBOLS" }