GNURLOPT_SSLENGINE(3)

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

πŸ’… GNURLOPT_SSLENGINE(3) πŸ’…

okay bestie, welcome to the curl_easy_setopt options manual β€” this page is serving SSL engine identifier realness, and it’s lowkey iconic. no cap, let’s get into it 🫢

✨ NAME ✨

CURLOPT_SSLENGINE β€” set SSL engine identifier

🌸 SYNOPSIS 🌸

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE, char *id);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so you pass a pointer to a null-terminated string as the parameter. that string is literally the identifier for the crypto engine you want to use for your private key. slay πŸ’…

the application does not have to keep the string around after setting this option. periodt πŸŽ€

πŸŽ€ DEFAULT πŸŽ€

NULL

🌈 PROTOCOLS 🌈

all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. the whole TLS friend group showed up ✨

πŸ’– EXAMPLE πŸ’–

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

πŸ‘‘ AVAILABILITY πŸ‘‘

only if the SSL backend is OpenSSL built with engine support. that’s the vibe check, bestie 🧚

πŸ”₯ RETURN VALUE πŸ”₯

  • CURLE_OK β€” Engine found.
  • CURLE_SSL_ENGINE_NOTFOUND β€” Engine not found, or OpenSSL was not built with engine support.
  • CURLE_SSL_ENGINE_INITFAILED β€” Engine found but initialization failed.
  • 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.

like… read the return value, it’s literally telling you what happened πŸ’€

🫢 SEE ALSO 🫢


later bestie πŸ’– this page was from libcurl 7.37.0, dated 17 Jun 2014, and it’s the GNURLOPT_SSLENGINE(3) page β€” mwah, slay, bye βœ¨πŸ’…πŸŽ€

πŸ“¦ where this page comes from