vtls: fix build with ssl but without http

Fixes #16935
Closes #16937
This commit is contained in:
Stefan Eissing 2025-04-03 11:09:01 +02:00 committed by Daniel Stenberg
parent 4cf9e87fca
commit b56b0c078e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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;