cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: simplest https program using libcurl compiled with SSH support

From: Nick Zitzmann <nick_at_chronosnet.com>
Date: Wed, 27 Feb 2013 15:36:27 -0700

On Feb 27, 2013, at 2:51 PM, Katie Scott <katie_at_singularpoint.com> wrote:

> Why would curl compile and provide https by only linking to libcurl - and yet I would have to link to libcurl AND libssl for my program?

Unless you statically built libcurl, libcurl is linked against libssh2 if you turned on SSH support, and whichever SSL library you built it against if you turned on SSL/TLS support. The two protocols were independently invented around the same time (1994-95) and are not compatible with one another. In particular, SSH is used mainly for file transfers and remote shell, while SSL/TLS is used to secure protocols that already existed at the time.

If you statically built libcurl, then you'll have to link your built product to libssh2 and the TLS/SSL library in addition to libcurl. That's how static libraries work.

Nick Zitzmann
<http://www.chronosnet.com/>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-27