From: Stefan Eissing Date: Thu, 3 Apr 2025 09:09:01 +0000 (+0200) Subject: vtls: fix build with ssl but without http X-Git-Tag: curl-8_14_0~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b56b0c078e285aeea89ab01b913a502fb42bbdfd;p=thirdparty%2Fcurl.git vtls: fix build with ssl but without http Fixes #16935 Closes #16937 --- diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index b44b76473d..6da7554900 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -1661,8 +1661,14 @@ static CURLcode cf_ssl_create(struct Curl_cfilter **pcf, DEBUGASSERT(data->conn); +#ifdef CURL_DISABLE_HTTP + /* We only support ALPN for HTTP so far. */ + DEBUGASSERT(!conn->bits.tls_enable_alpn); + ctx = cf_ctx_new(data, NULL); +#else ctx = cf_ctx_new(data, alpn_get_spec(data->state.http_neg.wanted, conn->bits.tls_enable_alpn)); +#endif if(!ctx) { result = CURLE_OUT_OF_MEMORY; goto out;