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, /* deprecated */
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         CURLSSLBACKEND_BEARSSL = 13
30       } curl_sslbackend;
31
32       CURLsslset curl_global_sslset(curl_sslbackend  id,
33                                     const char * name,
34                                     curl_ssl_backend *** avail );
35

DESCRIPTION

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

AVAILABILITY

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

RETURN VALUE

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

SEE ALSO

89       curl_global_init(3), libcurl(3)
90
91
92
93libcurl 7.69.1                  March 04, 2020           curl_global_sslset(3)
Impressum