From b56b0c078e285aeea89ab01b913a502fb42bbdfd Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Thu, 3 Apr 2025 11:09:01 +0200 Subject: [PATCH] vtls: fix build with ssl but without http Fixes #16935 Closes #16937 --- lib/vtls/vtls.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.47.3