mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:33:35 +03:00
NPN: remove support for and use of
Next Protocol Negotiation is a TLS extension that was created and used for agreeing to use the SPDY protocol (the precursor to HTTP/2) for HTTPS. In the early days of HTTP/2, before the spec was finalized and shipped, the protocol could be enabled using this extension with some servers. curl supports the NPN extension with some TLS backends since then, with a command line option `--npn` and in libcurl with `CURLOPT_SSL_ENABLE_NPN`. HTTP/2 proper is made to use the ALPN (Application-Layer Protocol Negotiation) extension and the NPN extension has no purposes anymore. The HTTP/2 spec was published in May 2015. Today, use of NPN in the wild should be extremely rare and most likely totally extinct. Chrome removed NPN support in Chrome 51, shipped in June 2016. Removed in Firefox 53, April 2017. Closes #9307
This commit is contained in:
parent
e08c82f046
commit
472f1cbe7e
22 changed files with 55 additions and 177 deletions
|
|
@ -267,7 +267,6 @@ struct OperationConfig {
|
|||
certificate for authentication (Schannel) */
|
||||
bool proxy_ssl_auto_client_cert; /* proxy version of ssl_auto_client_cert */
|
||||
char *oauth_bearer; /* OAuth 2.0 bearer token */
|
||||
bool nonpn; /* enable/disable TLS NPN extension */
|
||||
bool noalpn; /* enable/disable TLS ALPN extension */
|
||||
char *unix_socket_path; /* path to Unix domain socket */
|
||||
bool abstract_unix_socket; /* path to an abstract Unix domain socket */
|
||||
|
|
|
|||
|
|
@ -740,7 +740,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
global->tracetype = TRACE_BIN;
|
||||
break;
|
||||
case 'G': /* --npn */
|
||||
config->nonpn = (!toggle)?TRUE:FALSE;
|
||||
warnf(global, "--npn is no longer supported\n");
|
||||
break;
|
||||
case 'h': /* --trace-ascii */
|
||||
GetStr(&global->trace_dump, nextarg);
|
||||
|
|
|
|||
|
|
@ -2084,10 +2084,6 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
|||
if(config->sasl_ir)
|
||||
my_setopt(curl, CURLOPT_SASL_IR, 1L);
|
||||
|
||||
if(config->nonpn) {
|
||||
my_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 0L);
|
||||
}
|
||||
|
||||
if(config->noalpn) {
|
||||
my_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 0L);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue