GNURLOPT_S...NE_DEFAULT(3)
β¨ 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
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms