1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.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) 11Protocol: 12 - TLS 13TLS-backend: 14 - OpenSSL 15--- 16 17# NAME 18 19CURLOPT_SSLENGINE - SSL engine identifier 20 21# SYNOPSIS 22 23~~~c 24#include <curl/curl.h> 25 26CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE, char *id); 27~~~ 28 29# DESCRIPTION 30 31Pass a pointer to a null-terminated string as parameter. It is used as the 32identifier for the crypto engine you want to use for your private key. 33 34The application does not have to keep the string around after setting this 35option. 36 37# DEFAULT 38 39NULL 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 OpenSSL is 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