]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
curl: Try to initialize with SSL support to handle https:// URIs
authorMartin Willi <martin@revosec.ch>
Thu, 28 Aug 2014 09:09:26 +0000 (11:09 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 24 Sep 2014 09:35:59 +0000 (11:35 +0200)
If initialization fails, we fall back to the old behavior.

src/libstrongswan/plugins/curl/curl_plugin.c

index 062fe129f798936ecddbabf04172a9cb13d629ab..ab63a50cc0b27fc8fcb12fc1b5ab6ed59c54fbbc 100644 (file)
@@ -79,7 +79,12 @@ plugin_t *curl_plugin_create()
                },
        );
 
-       res = curl_global_init(CURL_GLOBAL_NOTHING);
+       res = curl_global_init(CURL_GLOBAL_SSL);
+       if (res != CURLE_OK)
+       {
+               /* no SSL support? Try without */
+               res = curl_global_init(CURL_GLOBAL_NOTHING);
+       }
        if (res != CURLE_OK)
        {
                DBG1(DBG_LIB, "global libcurl initializing failed: %s",