You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compiling libcurl with mbedTLS 2.4.0 (compiled with MBEDTLS_DEPRECATED_REMOVED) fails #1087
We compiled the current version of mbedTLS (2.4.0) with "MBEDTLS_DEPRECATED_REMOVED", and we compiled libcurl to reference that library. Compilation of libcurl fails with:
vtls/mbedtls.c: In function ‘mbed_connect_step1’:
vtls/mbedtls.c:361: error: ‘mbedtls_net_send’ undeclared (first use in this function)
vtls/mbedtls.c:361: error: (Each undeclared identifier is reported only once
vtls/mbedtls.c:361: error: for each function it appears in.)
vtls/mbedtls.c:362: error: ‘mbedtls_net_recv’ undeclared (first use in this function)
make[2]: *** [vtls/libcurl_la-mbedtls.lo] Error 1
I expected the following
Successful compilation.
curl/libcurl version
7.50.3
operating system
Linux (CentOS 5)
Solution
In "lib/vtls/mbedtls.c" change the include from: "#include <mbedtls/net.h>" to "#include <mbedtls/net_sockets.h>"
changed the title [-]Compiling libcurl with mbedTLS (compiled with MBEDTLS_DEPRECATED_REMOVED) fails[/-][+]Compiling libcurl with mbedTLS 2.4.0 (compiled with MBEDTLS_DEPRECATED_REMOVED) fails[/+]on Oct 26, 2016
I don't know where the minimum dependency versions for various configurations are documented (if anywhere), but it should be noted that this breaks compiling curl 7.51 against any version of mbedtls earlier than 2.4. Should this be made version-conditional?
Activity
[-]Compiling libcurl with mbedTLS (compiled with MBEDTLS_DEPRECATED_REMOVED) fails[/-][+]Compiling libcurl with mbedTLS 2.4.0 (compiled with MBEDTLS_DEPRECATED_REMOVED) fails[/+]bagder commentedon Oct 26, 2016
Thanks!
tkelman commentedon Nov 4, 2016
I don't know where the minimum dependency versions for various configurations are documented (if anywhere), but it should be noted that this breaks compiling curl 7.51 against any version of mbedtls earlier than 2.4. Should this be made version-conditional?
Upgrade curl to 7.51.0
bagder commentedon Nov 4, 2016
Ugh. Well I call that a stupid decision by the mbedTLS people since they could just have made the old header name work.
Having it version-conditional sounds sensible, if we can figure out the mbedtls version before the included is made?
tkelman commentedon Nov 4, 2016
2.4.0 was the first mbedtls release that included Mbed-TLS/mbedtls@3616f6f
bagder commentedon Nov 4, 2016
Like this?
tkelman commentedon Nov 4, 2016
Looks about right. Will test that and report back.
Upgrade curl to 7.51.0
tkelman commentedon Nov 4, 2016
That's working so far, against mbedtls 2.3.0.
mbedtls: fix build with mbedtls versions < 2.4.0
bagder commentedon Nov 4, 2016
Thanks!
Upgrade curl to 7.51.0