Browse files

curl_global_sslset(): fix wrong return value

When compiled with a single SSL backend, Curl_ssl is never set to
Curl_ssl_multi, but to that single backend from the beginning.

When the caller tries to set the SSL backend to a different backend than
the one that was compiled in, in this scenario we should not say that it
is too late to set the SSL backend, but that it is an unknown backend to
begin with.

Signed-off-by: Johannes Schindelin <>
  • Loading branch information...
dscho committed Dec 6, 2018
1 parent 231a328 commit 639f6f7bfbfcf3de1e467877be31d9790b864f19
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/vtls/vtls.c
@@ -1315,7 +1315,12 @@ CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
if(Curl_ssl != &Curl_ssl_multi)
return id == Curl_ssl-> ||
(name && strcasecompare(name, Curl_ssl-> ?
#if defined(CURL_WITH_MULTI_SSL)

for(i = 0; available_backends[i]; i++) {
if(available_backends[i]-> == id ||

0 comments on commit 639f6f7

Please sign in to comment.