I built curl from the source (on Debian 10 machine) as follows:
LD_LIBRARY_PATH=/usr/local/openssl3.0/lib64 ./configure --with-openssl=/usr/local/openssl3.0
make
make install
When I went to check the version of my new build of curl, I don't see OpenSSL 3 in the output:
root@ip-10-0-0-252:/usr/local/bin# /usr/local/bin/curl -V
curl 7.84.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 OpenSSL/1.1.1n zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
This output shows OpenSSL/1.1.1n.
However, curl-config looks correct:
root@ip-10-0-0-252:/usr/local/bin# ./curl-config --ssl-backends
OpenSSL v3+
And ldd looks correct:
root@ip-10-0-0-252:/usr/local/bin# ldd /usr/local/bin/curl
linux-vdso.so.1 (0x00007fffc4ddd000)
libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fea3312a000)
libssl.so.3 => /usr/local/openssl3.0/lib64/libssl.so.3 (0x00007fea33082000)
libcrypto.so.3 => /usr/local/openssl3.0/lib64/libcrypto.so.3 (0x00007fea32c20000)
...
Why is the output different from curl -V different from the others? What's the best way to prove which version of OpenSSL curl is using?