1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 17:31:46 -05:00
Johannes Schindelin 1328f69d53
vtls: introduce curl_global_sslset()
Let's add a compile time safe API to select an SSL backend. This
function needs to be called *before* curl_global_init(), and can be
called only once.

Side note: we do not explicitly test that it is called before
curl_global_init(), but we do verify that it is not called multiple times
(even implicitly).

If SSL is used before the function was called, it will use whatever the
CURL_SSL_BACKEND environment variable says (or default to the first
available SSL backend), and if a subsequent call to
curl_global_sslset() disagrees with the previous choice, it will fail
with CURLSSLSET_TOO_LATE.

The function also accepts an "avail" parameter to point to a (read-only)
NULL-terminated list of available backends. This comes in real handy if
an application wants to let the user choose between whatever SSL backends
the currently available libcurl has to offer: simply call

	curl_global_sslset(-1, NULL, &avail);

which will return CURLSSLSET_UNKNOWN_BACKEND and populate the avail
variable to point to the relevant information to present to the user.

Just like with the HTTP/2 push functions, we have to add the function
declaration of curl_global_sslset() function to the header file
*multi.h* because VMS and OS/400 require a stable order of functions
declared in include/curl/*.h (where the header files are sorted
alphabetically). This looks a bit funny, but it cannot be helped.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2017-08-28 14:56:59 +02:00
..
2017-08-28 14:56:59 +02:00
2016-10-18 13:59:54 +02:00
2017-08-23 03:17:10 -04:00
2017-04-22 11:25:27 +02:00
2017-03-13 23:11:45 +01:00
2017-03-13 23:11:45 +01:00
2017-03-13 23:11:45 +01:00
2017-03-26 23:56:23 +02:00
2017-07-28 16:41:29 +02:00
2017-06-30 10:17:27 +02:00
2017-08-06 23:42:50 +02:00
2017-03-13 23:11:45 +01:00
2017-04-22 11:25:27 +02:00
2017-04-22 11:25:27 +02:00
2017-05-11 10:04:01 +02:00
2017-06-30 10:17:27 +02:00
2017-04-22 11:25:27 +02:00
2017-04-22 11:25:27 +02:00
2017-03-13 23:11:45 +01:00
2017-03-26 23:56:23 +02:00
2017-06-18 23:57:45 +02:00
2016-12-21 11:07:26 +01:00
2017-08-23 23:58:49 +02:00
2017-07-10 10:22:34 +02:00
2017-04-22 11:25:27 +02:00
2017-03-26 23:56:23 +02:00
2017-06-21 07:46:21 +02:00
2017-08-01 13:39:38 +02:00
2017-06-08 10:50:47 +02:00
2017-08-03 10:04:16 +02:00
2017-03-13 23:11:45 +01:00
2017-03-26 23:56:23 +02:00
2017-05-01 22:55:29 +02:00
2017-06-30 10:17:27 +02:00
2017-06-30 10:17:27 +02:00
2017-06-30 10:17:27 +02:00
2016-12-24 23:35:43 +01:00
2017-06-30 10:17:27 +02:00
2017-03-13 23:11:45 +01:00
2017-03-26 23:56:23 +02:00
2017-08-12 17:25:50 +02:00