.\" generated by cd2nroff 0.1 from CURLOPT_HTTPSIG_ALGORITHM.md .TH CURLOPT_HTTPSIG_ALGORITHM 3 "2026-09-02" libcurl .SH NAME CURLOPT_HTTPSIG_ALGORITHM \- RFC 9421 HTTP Message Signatures algorithm .SH SYNOPSIS .nf #include CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPSIG_ALGORITHM, long algorithm); .fi .SH DESCRIPTION This feature is \fBexperimental\fP and may change before it is considered stable. We advise against using it in production. Enable RFC 9421 HTTP Message Signatures on outgoing requests. Pass a long set to one of the values below to select the signing algorithm. .IP "CURLHTTPSIG_NONE (0)" Disable HTTP Message Signatures. .IP "CURLHTTPSIG_ED25519 (1)" Sign with Ed25519 (RFC 8032). Requires a TLS backend with Ed25519 support. .IP "CURLHTTPSIG_HMAC_SHA256 (2)" Sign with HMAC\-SHA256. .PP Setting this option to a non\-zero value also sets \fICURLOPT_HTTPAUTH(3)\fP to CURLAUTH_HTTPSIG. The options \fICURLOPT_HTTPSIG_KEY(3)\fP and \fICURLOPT_HTTPSIG_KEYID(3)\fP must also be set. .SH DEFAULT CURLHTTPSIG_NONE (0) .SH PROTOCOLS This functionality affects http only .SH EXAMPLE .nf int main(void) { CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/api"); curl_easy_setopt(curl, CURLOPT_HTTPSIG_ALGORITHM, CURLHTTPSIG_ED25519); curl_easy_setopt(curl, CURLOPT_HTTPSIG_KEY, "9f8362f87a484a954e6e740c5b4c0e84" "229139a20aa8ab56ff66586f6a7d29c5"); curl_easy_setopt(curl, CURLOPT_HTTPSIG_KEYID, "my-key-id"); curl_easy_perform(curl); } } .fi .SH AVAILABILITY Added in curl 8.22.0 .SH RETURN VALUE \fIcurl_easy_setopt(3)\fP returns a CURLcode indicating success or error. CURLE_OK (0) means everything was OK, non\-zero means an error occurred, see \fIlibcurl\-errors(3)\fP. .SH SEE ALSO .BR CURLOPT_HTTPAUTH (3), .BR CURLOPT_HTTPSIG_HEADERS (3), .BR CURLOPT_HTTPSIG_KEY (3), .BR CURLOPT_HTTPSIG_KEYID (3)