1--- 2c: Copyright (C) Daniel Stenberg, <daniel.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) 11--- 12 13# NAME 14 15CURLINFO_SSL_ENGINES - get an slist of OpenSSL crypto-engines 16 17# SYNOPSIS 18 19~~~c 20#include <curl/curl.h> 21 22CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_ENGINES, 23 struct curl_slist **engine_list); 24~~~ 25 26# DESCRIPTION 27 28Pass the address of a 'struct curl_slist *' to receive a linked-list of 29OpenSSL crypto-engines supported. Note that engines are normally implemented 30in separate dynamic libraries. Hence not all the returned engines may be 31available at runtime. **NOTE:** you must call curl_slist_free_all(3) 32on the list pointer once you are done with it, as libcurl does not free this 33data for you. 34 35# PROTOCOLS 36 37All TLS based ones. 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