]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
vtls: fix build with ssl but without http
authorStefan Eissing <stefan@eissing.org>
Thu, 3 Apr 2025 09:09:01 +0000 (11:09 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 3 Apr 2025 09:37:45 +0000 (11:37 +0200)
Fixes #16935
Closes #16937

lib/vtls/vtls.c

index b44b76473d299a7bf4782c861cedf56d858638c2..6da75549005972b24d159bf823502b6dba35fbcf 100644 (file)
@@ -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;