1CURLOPT_SSL_ENABLE_NPN(3)           libcurl          CURLOPT_SSL_ENABLE_NPN(3)
2
3
4

NAME

6       CURLOPT_SSL_ENABLE_NPN - use NPN
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_NPN, long npn);
12

DESCRIPTION

14       Deprecated in 7.86.0. Setting this option has no function.
15
16       Pass  a  long as parameter, 0 or 1 where 1 is for enable and 0 for dis‐
17       able. This option enables/disables NPN in the SSL handshake (if the SSL
18       backend  libcurl is built to use supports it), which can be used to ne‐
19       gotiate http2.
20

DEFAULT

22       1, enabled
23

PROTOCOLS

25       HTTP
26

EXAMPLE

28       CURL *curl = curl_easy_init();
29       if(curl) {
30         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
31         curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 1L);
32         ret = curl_easy_perform(curl);
33         curl_easy_cleanup(curl);
34       }
35

AVAILABILITY

37       Added in 7.36.0. Deprecated in 7.86.0.
38

RETURN VALUE

40       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
41       if not.
42

SEE ALSO

44       CURLOPT_SSL_ENABLE_ALPN(3), CURLOPT_SSL_OPTIONS(3),
45
46
47
48ibcurl 8.2.1                    April 26, 2023       CURLOPT_SSL_ENABLE_NPN(3)
Impressum