1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLINFO_SSL_ENGINES
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_SSLENGINE (3)
9  - curl_easy_getinfo (3)
10  - curl_easy_setopt (3)
11Protocol:
12  - TLS
13TLS-backend:
14  - OpenSSL
15Added-in: 7.12.3
16---
17
18# NAME
19
20CURLINFO_SSL_ENGINES - get an slist of OpenSSL crypto-engines
21
22# SYNOPSIS
23
24~~~c
25#include <curl/curl.h>
26
27CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_ENGINES,
28                           struct curl_slist **engine_list);
29~~~
30
31# DESCRIPTION
32
33Pass the address of a 'struct curl_slist *' to receive a linked-list of
34OpenSSL crypto-engines supported. Note that engines are normally implemented
35in separate dynamic libraries. Hence not all the returned engines may be
36available at runtime. **NOTE:** you must call curl_slist_free_all(3)
37on the list pointer once you are done with it, as libcurl does not free this
38data for you.
39
40# %PROTOCOLS%
41
42# EXAMPLE
43
44~~~c
45int main(void)
46{
47  CURL *curl = curl_easy_init();
48  if(curl) {
49    CURLcode res;
50    struct curl_slist *engines;
51    res = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
52    if((res == CURLE_OK) && engines) {
53      /* we have a list, free it when done using it */
54      curl_slist_free_all(engines);
55    }
56
57    curl_easy_cleanup(curl);
58  }
59}
60~~~
61
62# %AVAILABILITY%
63
64# RETURN VALUE
65
66Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
67