diff options
author | Fabian Frank <fabian@pagefault.de> | 2014-02-09 23:38:55 -0800 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-02-10 13:06:17 +0100 |
commit | 909a68c1216b6ea5dbeceaedecec16a0599793d1 (patch) | |
tree | 830bfa629484d94a9f17e9bb285e8a0726e75eee /lib/url.c | |
parent | 70bd9784de06c0154663126e406b946befef2b5a (diff) |
NPN/ALPN: allow disabling via command line
when using --http2 one can now selectively disable NPN or ALPN with
--no-alpn and --no-npn. for now honored with NSS only.
TODO: honor this option with GnuTLS and OpenSSL
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -563,6 +563,8 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) set->tcp_keepintvl = 60; set->tcp_keepidle = 60; + set->ssl_enable_npn = TRUE; + set->ssl_enable_alpn = TRUE; return res; } @@ -2478,6 +2480,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, case CURLOPT_TCP_KEEPINTVL: data->set.tcp_keepintvl = va_arg(param, long); break; + case CURLOPT_SSL_ENABLE_NPN: + data->set.ssl_enable_npn = (0 != va_arg(param, long))?TRUE:FALSE; + break; + case CURLOPT_SSL_ENABLE_ALPN: + data->set.ssl_enable_alpn = (0 != va_arg(param, long))?TRUE:FALSE; + break; default: /* unknown tag and its companion, just ignore: */ |