CURLOPT_SS...ALGORITHMS(3)

πŸ’… CURLOPT_SS...ALGORITHMS(3) πŸ’…

okay so this is a page from the Library Functions Manual (libcurl girlies rise up) and it's all about CURLOPT_SSL_SIGNATURE_ALGORITHMS β€” yes that is a mouthful, we're abbreviating it in the header because the full name is lowkey too long for the page title 😭


✨ NAME ✨

CURLOPT_SSL_SIGNATURE_ALGORITHMS β€” the signature algorithms you wanna use for TLS, bestie πŸ”


🌸 SYNOPSIS 🌸

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_SIGNATURE_ALGORITHMS, char *list);

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: you pass a char pointer pointing at a null-terminated string, and that string holds the list of signature algorithms to use for the TLS connection. πŸ’–

The list has got to be syntactically correct β€” no freestyling, ngl. It consists of one or more signature algorithm strings separated by colons. That's the whole format, colon-separated, done.

A valid example of a signature algorithms list with OpenSSL is:

"DSA+SHA256:rsa_pss_pss_sha256"

The application does not have to keep the string around after setting this option β€” so you can let it go, it's fine, curl's got it 🫢

Using this option multiple times makes the last set string override the previous ones. Last one wins, periodt. Set it to NULL to disable its use again.

Works with OpenSSL and its BoringSSL fork (added in 8.14.0) πŸ‘‘


πŸŽ€ DEFAULT πŸŽ€

NULL, use built-in list β€” so if you never touch it, curl just does its own thing ✨


🌈 PROTOCOLS 🌈

This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. only β€” like, literally just the TLS girlies πŸ’…

heads up: this option works only with the following TLS backends: OpenSSL. That's the whole list. No cap.

πŸ“ 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_SSL_SIGNATURE_ALGORITHMS,
                     "DSA+SHA256:rsa_pss_pss_sha256");
    result = curl_easy_perform(curl);
    curl_easy_cleanup(curl);
  }
}

look at her go 😭✨ iconic behavior honestly


⭐ HISTORY ⭐

OpenSSL support added in 8.14.0. that's the lore πŸ“–


🧚 AVAILABILITY 🧚

Added in curl 8.14.0 β€” so if you're on something older, bestie, it's giving "not yet" πŸ™ˆ


πŸ’œ RETURN VALUE πŸ’œ

curl_easy_setopt(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK πŸ’– non-zero means an error occurred β€” see libcurl-errors(3) for the full tea.


πŸ‘‘ SEE ALSO πŸ‘‘

go read those next, you're gonna slay πŸ”₯


okay that's the whole page!! mwah πŸ’‹ this was brought to you by libcurl, dated 2026-10-25, and yeah the title in the corner still says CURLOPT_SS...ALGORITHMS(3) because we abbreviate around here πŸŽ€βœ¨

πŸ“¦ where this page comes from