]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_global_sslset: select backend by name case insensitively
authorDaniel Stenberg <daniel@haxx.se>
Thu, 31 Aug 2017 09:54:51 +0000 (11:54 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 1 Sep 2017 09:51:32 +0000 (11:51 +0200)
Closes #1849

docs/libcurl/curl_global_sslset.3
lib/vtls/vtls.c

index 5e7a26359678c9c1bab219aeead8d386c0d80a11..b438f8ad0acb5c287ec6a98bab4c966377f7d6b1 100644 (file)
@@ -56,8 +56,8 @@ must be called \fBbefore\fP \fIcurl_global_init(3)\fP.
 
 The backend can be identified by the \fIid\fP
 (e.g. \fBCURLSSLBACKEND_OPENSSL\fP). The backend can also be specified via the
-\fIname\fP parameter (passing -1 as \fIid\fP). If both \fIid\fP and \fIname\fP
-are specified, the \fIname\fP will be ignored.
+\fIname\fP parameter for a case insensitive match (passing -1 as \fIid\fP). If
+both \fIid\fP and \fIname\fP are specified, the \fIname\fP will be ignored.
 
 If neither \fIid\fP nor \fPname\fP are specified, the function will fail with
 CURLSSLSET_UNKNOWN_BACKEND and set the \fIavail\fP pointer to the
index 73ed7a31b43d4804c7884b1d4a1f249373e9f74b..3647dff714e8941651941107d372ad456909561f 100644 (file)
@@ -1272,7 +1272,7 @@ CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
 
   for(i = 0; available_backends[i]; i++)
     if(available_backends[i]->info.id == id ||
-       (name && !strcmp(available_backends[i]->info.name, name))) {
+       (name && Curl_strcasecompare(available_backends[i]->info.name, name))) {
       multissl_init(available_backends[i]);
       return CURLSSLSET_OK;
     }