CURLOPT\_SSLENGINE\_DEFAULT(3) Library Functions Manual CURLOPT\_SSLENGINE\_DEFAULT(3)

# [NAME](#NAME)

CURLOPT\_SSLENGINE\_DEFAULT - make SSL engine default

# [SYNOPSIS](#SYNOPSIS)

```
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE_DEFAULT, long val);
```

# [DESCRIPTION](#DESCRIPTION)

Pass a long set to 1 to make the already specified crypto engine the default for (asymmetric) crypto operations.

This option has no effect unless set after [*CURLOPT\_SSLENGINE(3)*](/man/os/curl/CURLOPT_SSLENGINE.3).

# [DEFAULT](#DEFAULT)

None

# [PROTOCOLS](#PROTOCOLS)

This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. only

This option works only with the following TLS backends: OpenSSL

# [EXAMPLE](#EXAMPLE)

```
int main(void)
{


  CURL *curl = curl_easy_init();


  if(curl) {


    CURLcode result;


    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");


    curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic");


    curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);


    result = curl_easy_perform(curl);


    curl_easy_cleanup(curl);


  }
}
```

# [AVAILABILITY](#AVAILABILITY)

Added in curl 7.9.3

# [RETURN VALUE](#RETURN_VALUE)

CURLE\_OK - Engine set as default.

CURLE\_SSL\_ENGINE\_SETFAILED - Engine could not be set as default.

CURLE\_NOT\_BUILT\_IN - Option not built in, OpenSSL is not the SSL backend.

CURLE\_UNKNOWN\_OPTION - Option not recognized.

CURLE\_OUT\_OF\_MEMORY - Insufficient heap space.

# [SEE ALSO](#SEE_ALSO)

[**CURLOPT\_SSLCERT**(3)](/man/os/curl/CURLOPT_SSLCERT.3), [**CURLOPT\_SSLENGINE**(3)](/man/os/curl/CURLOPT_SSLENGINE.3)

2026-10-01 libcurl

---

Document: CURLOPT_SSLENGINE_DEFAULT(3) from curl 8.22.0-r4 (Chainguard OS)
Source: https://github.com/curl/curl.git
