CURLOPT_SSLENGINE.md (1831B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Title: CURLOPT_SSLENGINE 5 Section: 3 6 Source: libcurl 7 See-also: 8 - CURLINFO_SSL_ENGINES (3) 9 - CURLOPT_SSLENGINE_DEFAULT (3) 10 - CURLOPT_SSLKEY (3) 11 Protocol: 12 - TLS 13 TLS-backend: 14 - OpenSSL 15 Added-in: 7.9.3 16 --- 17 18 # NAME 19 20 CURLOPT_SSLENGINE - Set SSL engine or provider 21 22 # SYNOPSIS 23 24 ~~~c 25 #include <curl/curl.h> 26 27 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE, char *id); 28 ~~~ 29 30 # DESCRIPTION 31 32 Pass a pointer to a null-terminated string as parameter. It is used as the 33 identifier for the *engine* or *provider* you want to use for your private 34 key. OpenSSL 1 had engines, OpenSSL 3 has providers. 35 36 The application does not have to keep the string around after setting this 37 option. 38 39 When asking libcurl to use a provider, the application can also optionally 40 provide a *property*, a set of name value pairs. Such a property can be 41 specified separated from the name with a colon (`:`). 42 43 Using this option multiple times makes the last set string override the 44 previous ones. Set it to NULL to disable its use again. 45 46 # DEFAULT 47 48 NULL 49 50 # %PROTOCOLS% 51 52 # EXAMPLE 53 54 ~~~c 55 int main(void) 56 { 57 CURL *curl = curl_easy_init(); 58 if(curl) { 59 CURLcode res; 60 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 61 curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic"); 62 res = curl_easy_perform(curl); 63 curl_easy_cleanup(curl); 64 } 65 } 66 ~~~ 67 68 # %AVAILABILITY% 69 70 # RETURN VALUE 71 72 CURLE_OK - Engine found. 73 74 CURLE_SSL_ENGINE_NOTFOUND - Engine not found, or OpenSSL was not built with 75 engine support. 76 77 CURLE_SSL_ENGINE_INITFAILED - Engine found but initialization failed. 78 79 CURLE_NOT_BUILT_IN - Option not built in, OpenSSL is not the SSL backend. 80 81 CURLE_UNKNOWN_OPTION - Option not recognized. 82 83 CURLE_OUT_OF_MEMORY - Insufficient heap space.