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
15---
16
17# NAME
18
19CURLINFO_SSL_ENGINES - get an slist of OpenSSL crypto-engines
20
21# SYNOPSIS
22
23~~~c
24#include <curl/curl.h>
25
26CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_ENGINES,
27                           struct curl_slist **engine_list);
28~~~
29
30# DESCRIPTION
31
32Pass the address of a 'struct curl_slist *' to receive a linked-list of
33OpenSSL crypto-engines supported. Note that engines are normally implemented
34in separate dynamic libraries. Hence not all the returned engines may be
35available at runtime. **NOTE:** you must call curl_slist_free_all(3)
36on the list pointer once you are done with it, as libcurl does not free this
37data for you.
38
39# EXAMPLE
40
41~~~c
42int main(void)
43{
44  CURL *curl = curl_easy_init();
45  if(curl) {
46    CURLcode res;
47    struct curl_slist *engines;
48    res = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
49    if((res == CURLE_OK) && engines) {
50      /* we have a list, free it when done using it */
51      curl_slist_free_all(engines);
52    }
53
54    curl_easy_cleanup(curl);
55  }
56}
57~~~
58
59# AVAILABILITY
60
61Added in 7.12.3. Available in OpenSSL builds with "engine" support.
62
63# RETURN VALUE
64
65Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
66