1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_SSLENGINE_DEFAULT 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_SSLCERT (3) 9 - CURLOPT_SSLENGINE (3) 10--- 11 12# NAME 13 14CURLOPT_SSLENGINE_DEFAULT - make SSL engine default 15 16# SYNOPSIS 17 18~~~c 19#include <curl/curl.h> 20 21CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE_DEFAULT, long val); 22~~~ 23 24# DESCRIPTION 25 26Pass a long set to 1 to make the already specified crypto engine the default 27for (asymmetric) crypto operations. 28 29This option has no effect unless set after CURLOPT_SSLENGINE(3). 30 31# DEFAULT 32 33None 34 35# PROTOCOLS 36 37All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. 38 39# EXAMPLE 40 41~~~c 42int main(void) 43{ 44 CURL *curl = curl_easy_init(); 45 if(curl) { 46 CURLcode res; 47 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 48 curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic"); 49 curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L); 50 res = curl_easy_perform(curl); 51 curl_easy_cleanup(curl); 52 } 53} 54~~~ 55 56# AVAILABILITY 57 58Only if the SSL backend is OpenSSL built with engine support. 59 60# RETURN VALUE 61 62CURLE_OK - Engine set as default. 63 64CURLE_SSL_ENGINE_SETFAILED - Engine could not be set as default. 65 66CURLE_NOT_BUILT_IN - Option not built in, OpenSSL is not the SSL backend. 67 68CURLE_UNKNOWN_OPTION - Option not recognized. 69 70CURLE_OUT_OF_MEMORY - Insufficient heap space. 71