CURLINFO_SSL_ENGINES.md (1526B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Title: CURLINFO_SSL_ENGINES 5 Section: 3 6 Source: libcurl 7 See-also: 8 - CURLOPT_SSLENGINE (3) 9 - curl_easy_getinfo (3) 10 - curl_easy_setopt (3) 11 Protocol: 12 - TLS 13 TLS-backend: 14 - OpenSSL 15 Added-in: 7.12.3 16 --- 17 18 # NAME 19 20 CURLINFO_SSL_ENGINES - get an slist of OpenSSL crypto-engines 21 22 # SYNOPSIS 23 24 ~~~c 25 #include <curl/curl.h> 26 27 CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_ENGINES, 28 struct curl_slist **engine_list); 29 ~~~ 30 31 # DESCRIPTION 32 33 Pass the address of a 'struct curl_slist *' to receive a linked-list of 34 OpenSSL crypto-engines supported. Note that engines are normally implemented 35 in separate dynamic libraries. Hence not all the returned engines may be 36 available at runtime. **NOTE:** you must call curl_slist_free_all(3) 37 on the list pointer once you are done with it, as libcurl does not free this 38 data for you. 39 40 # %PROTOCOLS% 41 42 # EXAMPLE 43 44 ~~~c 45 int 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 66 curl_easy_getinfo(3) returns a CURLcode indicating success or error. 67 68 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see 69 libcurl-errors(3).