CURLOPT_SSL_ENABLE_NPN(3)
π CURLOPT_SSL_ENABLE_NPN(3) π
okay so this is a page from the Library Functions Manual, and bestie... it's a little bit of a ghost town page ngl. but we're gonna get through it together π«Ά
β¨ NAME β¨
CURLOPT_SSL_ENABLE_NPN β the "use NPN" option π« (yes. that's it. that's the whole name. iconic of it honestly)
πΈ SYNOPSIS πΈ
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_NPN, long npn);
π DESCRIPTION π
hiii so first things first, and I need you to sit down for this one:
Deprecated since 7.86.0. Setting this option has no function. like... none. zero. it does literally nothing. it's giving retired. it's giving "still on the roster but hasn't been to a meeting since 2022" π
okay but for the lore β¨ β here's what it used to be about, and what the option still formally takes:
- you pass a
longas the parameter - it's
0or1 1= enable,0= disable- what it did: enabled/disables NPN in the SSL handshake (but only if the SSL backend libcurl is built to use actually supports it, iykyk)
- and the whole point of that handshake party trick was that it can be used to negotiate http2 π¦
π DEFAULT π
1, enabled. (or as I like to call it, the default that no longer does anything π₯²)
π PROTOCOLS π
This functionality affects all TLS based protocols, bestie. all of them. the whole squad:
HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. π
also: All TLS backends support this option.
π¦ EXAMPLE π¦
here's the moment you've been waiting for, the example, and yes it does call the deprecated thing, don't @ me, I'm just the messenger π
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_ENABLE_NPN, 1L);
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
π DEPRECATED π
Deprecated since 7.86.0. that's it. that's the section. the whole section. it said what it said π
β AVAILABILITY β
Added in curl 7.36.0 β so it was born, and then it was deprecated. a whole arc. a whole character development speedrun π§
π₯ 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 β go check
libcurl-errors(3)to find out what went wrong π
π SEE ALSO π
and that's the page, bestie!! mwah π
signed off by the libcurl girlies, dated 2026-10-12 β catch you in the next manpage, slay β¨π
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms