diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-04-01 16:25:19 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-04-02 22:53:17 +0200 |
commit | f573998c22a20b0fbe4edb8dbd968aa2f7ca5864 (patch) | |
tree | 25bad18884e85c1b4d61f5c8418d9fdfcb468656 /lib/vtls/wolfssl.c | |
parent | 3085ccfae996bb0fa606d2c7bc6783dc15d76a30 (diff) | |
download | curl-f573998c22a20b0fbe4edb8dbd968aa2f7ca5864.tar.gz |
TLS: fix HTTP/2 selection
for GnuTLS, BearSSL, mbedTLS, NSS, SChannnel, Secure Transport and
wolfSSL...
Regression since 88dd1a8a115b1f5ece (shipped in 7.76.0)
Reported-by: Kenneth Davidson
Reported-by: romamik om github
Fixes #6825
Closes #6827
Diffstat (limited to 'lib/vtls/wolfssl.c')
-rw-r--r-- | lib/vtls/wolfssl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vtls/wolfssl.c b/lib/vtls/wolfssl.c index 8fb2ea7ac..c6f428034 100644 --- a/lib/vtls/wolfssl.c +++ b/lib/vtls/wolfssl.c @@ -475,7 +475,7 @@ wolfssl_connect_step1(struct Curl_easy *data, struct connectdata *conn, protocols in descending order of preference, eg: "h2,http/1.1" */ #ifdef USE_NGHTTP2 - if(data->state.httpversion >= CURL_HTTP_VERSION_2) { + if(data->state.httpwant >= CURL_HTTP_VERSION_2) { strcpy(protocols + strlen(protocols), NGHTTP2_PROTO_VERSION_ID ","); infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID); } @@ -726,7 +726,7 @@ wolfssl_connect_step2(struct Curl_easy *data, struct connectdata *conn, !memcmp(protocol, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH)) conn->negnpn = CURL_HTTP_VERSION_1_1; #ifdef USE_NGHTTP2 - else if(data->state.httpversion >= CURL_HTTP_VERSION_2 && + else if(data->state.httpwant >= CURL_HTTP_VERSION_2 && protocol_len == NGHTTP2_PROTO_VERSION_ID_LEN && !memcmp(protocol, NGHTTP2_PROTO_VERSION_ID, NGHTTP2_PROTO_VERSION_ID_LEN)) |