Menu

#1384 curl-config --feature reports SSL support, even if not supported

closed-invalid
nobody
None
5
2014-06-25
2014-06-25
No

The 'curl-config --feature' command reports support for SSL even if built without SSL support.

If I build libcurl with the following settings:

./configure --prefix=/usr --libdir=/usr/lib/i386-linux-gnu/ --with-gssapi --enable-debug --disable-curldebug --with-gnutls --without-ssl

Calling curl_version() from a C program reports:

libcurl/7.27.0 GnuTLS/2.12.14 zlib/1.2.7 libidn/1.25 librtmp/2.3

But 'curl-config --feature' reports:

$ curl-config --feature | grep SSL
SSL


If I build libcurl with the following settings:

./configure --prefix=/usr --libdir=/usr/lib/i386-linux-gnu/ --with-gssapi --enable-debug --disable-curldebug

Calling curl_version() from a C program reports:

libcurl/7.27.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.25 librtmp/2.3

And 'curl-config --feature' reports:

$ curl-config --feature | grep SSL
SSL

Based on this observation, I can't use 'curl-config --feature' to determine whether or not libcurl supports OpenSSL. Is there an alternate method to test for support?

Discussion

  • Dan Fandrich

    Dan Fandrich - 2014-06-25

    The "SSL" feature stands for "SSL" not "OpenSSL". GnuTLS provides SSL support to curl as well, so curl-config --feature is working as expected. curl-config doesn't provide a way to determine which SSL library is configured, although you can often infer it from --static-libs. But, it's dangerous to assume a specific SSL library at compile-time, since when using dynamic libraries an application could end up running with a different libcurl than the one against which it was compiled. Better to check it at run-time with CURLINFO_TLS_SESSION.

     
  • Dan Fandrich

    Dan Fandrich - 2014-06-25
    • status: open --> closed-invalid