diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-08-18 13:15:12 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-08-28 22:56:49 +0200 |
commit | 3063254e32717dab0208baf14648e9685cc2cbc1 (patch) | |
tree | 99621a7d1455027f044d65f3e7d56ac197f6e347 /lib | |
parent | 81d318fa95af55d53280e6efce263f227c201d68 (diff) |
vtls: use Curl_ssl_multi pseudo backend only when needed
When only one SSL backend is configured, it is totally unnecessary to
let multissl_init() configure the backend at runtime, we can select the
correct backend at build time already.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vtls/vtls.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index 26de25e36..85665b7df 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -1130,7 +1130,32 @@ static const struct Curl_ssl Curl_ssl_multi = { NULL /* sha256sum */ }; -const struct Curl_ssl *Curl_ssl = &Curl_ssl_multi; +const struct Curl_ssl *Curl_ssl = +#if defined(CURL_WITH_MULTI_SSL) + &Curl_ssl_multi; +#elif defined(USE_AXTLS) + &Curl_ssl_axtls; +#elif defined(USE_CYASSL) + &Curl_ssl_cyassl; +#elif defined(USE_DARWINSSL) + &Curl_ssl_darwinssl; +#elif defined(USE_GNUTLS) + &Curl_ssl_gnutls; +#elif defined(USE_GSKIT) + &Curl_ssl_gskit; +#elif defined(USE_MBEDTLS) + &Curl_ssl_mbedtls; +#elif defined(USE_NSS) + &Curl_ssl_nss; +#elif defined(USE_OPENSSL) + &Curl_ssl_openssl; +#elif defined(USE_POLARSSL) + &Curl_ssl_polarssl; +#elif defined(USE_SCHANNEL) + &Curl_ssl_schannel; +#else +#error "Missing struct Curl_ssl for selected SSL backend" +#endif static const struct Curl_ssl *available_backends[] = { #if defined(USE_AXTLS) |