---
name: "CURLOPT_SSLENGINE_DEFAULT"
section: "3"
platform: "linux"
package: "curl"
version: "8.23.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/CURLOPT_SSLENGINE_DEFAULT"
---

# CURLOPT\_SSLENGINE\_DEFAULT(3)

make SSL engine default

## NAME

CURLOPT\_SSLENGINE\_DEFAULT - make SSL engine default

## SYNOPSIS

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

## 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)](/CURLOPT_SSLENGINE/3.md)*.

## DEFAULT

None

## 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

```
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

Added in curl 7.9.3

## 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

[**CURLOPT\_SSLCERT**(3)](/CURLOPT_SSLCERT/3.md), [**CURLOPT\_SSLENGINE**(3)](/CURLOPT_SSLENGINE/3.md)
