1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_SSLENGINE 5Section: 3 6Source: libcurl 7See-also: 8 - CURLINFO_SSL_ENGINES (3) 9 - CURLOPT_SSLENGINE_DEFAULT (3) 10 - CURLOPT_SSLKEY (3) 11--- 12 13# NAME 14 15CURLOPT_SSLENGINE - SSL engine identifier 16 17# SYNOPSIS 18 19~~~c 20#include <curl/curl.h> 21 22CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE, char *id); 23~~~ 24 25# DESCRIPTION 26 27Pass a pointer to a null-terminated string as parameter. It is used as the 28identifier for the crypto engine you want to use for your private key. 29 30The application does not have to keep the string around after setting this 31option. 32 33# DEFAULT 34 35NULL 36 37# PROTOCOLS 38 39All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. 40 41# EXAMPLE 42 43~~~c 44int main(void) 45{ 46 CURL *curl = curl_easy_init(); 47 if(curl) { 48 CURLcode res; 49 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 50 curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic"); 51 res = curl_easy_perform(curl); 52 curl_easy_cleanup(curl); 53 } 54} 55~~~ 56 57# AVAILABILITY 58 59Only if the SSL backend is OpenSSL built with engine support. 60 61# RETURN VALUE 62 63CURLE_OK - Engine found. 64 65CURLE_SSL_ENGINE_NOTFOUND - Engine not found, or OpenSSL was not built with 66engine support. 67 68CURLE_SSL_ENGINE_INITFAILED - Engine found but initialization failed. 69 70CURLE_NOT_BUILT_IN - Option not built in, OpenSSL is not the SSL backend. 71 72CURLE_UNKNOWN_OPTION - Option not recognized. 73 74CURLE_OUT_OF_MEMORY - Insufficient heap space. 75