GNURLOPT_S...NE_DEFAULT(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

✨ NAME ✨

hiii bestie πŸ’– welcome to the GNURLOPT_S...NE_DEFAULT(3) page, which lives in the curl_easy_setopt options manual. Today's main character is one tiny OpenSSL engine flag, and yes we're gonna get into it.

CURLOPT_SSLENGINE_DEFAULT β€” make SSL engine default. That's the whole name, no cap.


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE_DEFAULT, long
val);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so you pass a long set to 1 β€” yes, 1 β€” and that makes the already specified crypto engine the default for (asymmetric) crypto operations. Slay. πŸ’…

⚠️ no cap: this option has no effect unless you set it after CURLOPT_SSLENGINE(3). Like, it literally does nothing if you skip that step, bestie. 😭

🌸 DEFAULT 🌸

None β€” there's no default default here. It's giving β€œyou gotta set it yourself” energy. πŸŽ€


🌈 PROTOCOLS 🌈

all TLS based protocols, periodt: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.


🧚 EXAMPLE 🧚

here's the lil code moment, copied exactly because we do not mess with code, fr fr:

CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic");
  curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}

⭐ AVAILABILITY ⭐

only if the SSL backend is OpenSSL built with engine support. that's the whole vibe check. πŸ¦‹


πŸ‘‘ 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 πŸ’œ

the SEE ALSO besties are CURLOPT_SSLENGINE(3), CURLOPT_SSLCERT(3), β€” yes there's a trailing comma in the original, iconic πŸ’… go peek, iykyk.


mwah πŸ’– that's the page, bestie. source/version and date for the sign-off: libcurl 7.37.0, 17 Jun 2014, and the manual page name is GNURLOPT_S...NE_DEFAULT(3). periodt. 🫢

πŸ“¦ where this page comes from