1curl_global_sslset(3)           libcurl Manual           curl_global_sslset(3)
2
3
4

NAME

6       curl_global_sslset - Select SSL backend to use with libcurl
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       typedef struct {
12         curl_sslbackend id;
13         const char *name;
14       } curl_ssl_backend;
15
16       typedef enum {
17         CURLSSLBACKEND_NONE = 0,
18         CURLSSLBACKEND_OPENSSL = 1,
19         CURLSSLBACKEND_GNUTLS = 2,
20         CURLSSLBACKEND_NSS = 3,
21         CURLSSLBACKEND_GSKIT = 5,
22         CURLSSLBACKEND_POLARSSL = 6,
23         CURLSSLBACKEND_WOLFSSL = 7,
24         CURLSSLBACKEND_SCHANNEL = 8,
25         CURLSSLBACKEND_DARWINSSL = 9,
26         CURLSSLBACKEND_AXTLS = 10, /* deprecated */
27         CURLSSLBACKEND_MBEDTLS = 11,
28         CURLSSLBACKEND_MESALINK = 12
29       } curl_sslbackend;
30
31       CURLsslset curl_global_sslset(curl_sslbackend  id,
32                                     const char * name,
33                                     curl_ssl_backend *** avail );
34

DESCRIPTION

36       This  function  configures  at  runtime  which  SSL backend to use with
37       libcurl. This function can only be used to select an SSL backend  once,
38       and it must be called before curl_global_init(3).
39
40       The  backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL).
41       The backend can also be specified via the name  parameter  for  a  case
42       insensitive  match  (passing  -1 as id). If both id and name are speci‐
43       fied, the name will be ignored.
44
45       If neither id nor name are  specified,  the  function  will  fail  with
46       CURLSSLSET_UNKNOWN_BACKEND and set the avail pointer to the NULL-termi‐
47       nated list of available backends. The available backends are those that
48       this particular build of libcurl supports.
49
50       Since  libcurl 7.60.0, the avail pointer will always be set to the list
51       of alternatives if non-NULL.
52
53       Upon success, the function returns CURLSSLSET_OK.
54
55       If the specified SSL backend is not  available,  the  function  returns
56       CURLSSLSET_UNKNOWN_BACKEND  and sets the avail pointer to a NULL-termi‐
57       nated list of available SSL backends. In this case, you  may  call  the
58       function again to try to select a different backend.
59
60       The  SSL  backend  can  be set only once. If it has already been set, a
61       subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
62
63       This function is not thread safe. You must not call it when  any  other
64       thread  in  the program (i.e. a thread sharing the same memory) is run‐
65       ning.  This doesn't just mean no other thread that is using libcurl.
66
67

AVAILABILITY

69       This function was added in libcurl 7.56.0. Before this  version,  there
70       was no support for choosing SSL backends at runtime.
71

RETURN VALUE

73       If  this  function  returns CURLSSLSET_OK, the backend was successfully
74       selected.
75
76       If the chosen backend is unknown (or support for the chosen backend has
77       not    been    compiled    into    libcurl),   the   function   returns
78       CURLSSLSET_UNKNOWN_BACKEND.
79
80       If   the   backend   had   been   configured    previously,    or    if
81       curl_global_init(3)  has  already  been  called,  the  function returns
82       CURLSSLSET_TOO_LATE.
83
84       If this libcurl was built completely without SSL support, with no back‐
85       ends at all, this function returns CURLSSLSET_NO_BACKENDS.
86

SEE ALSO

88       curl_global_init(3), libcurl(3)
89
90
91
92libcurl 7.64.0                 October 30, 2018          curl_global_sslset(3)
Impressum