]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_negotiate: fix non-SSL build with GSSAPI
authorAndrew <akirillo@uk.ibm.com>
Wed, 2 Apr 2025 12:45:21 +0000 (13:45 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 3 Apr 2025 06:25:09 +0000 (08:25 +0200)
Fixes #16919
Closes #16921

lib/http_negotiate.c

index 0b6e70c660642f0fde8258495635b2645f4c1b03..deb50f03d62f6777b33096d1dd4b8332d3c12b68 100644 (file)
@@ -110,8 +110,8 @@ CURLcode Curl_input_negotiate(struct Curl_easy *data, struct connectdata *conn,
 #endif
   /* Check if the connection is using SSL and get the channel binding data */
 #ifdef HAVE_GSSAPI
-  Curl_dyn_init(&neg_ctx->channel_binding_data, SSL_CB_MAX_SIZE + 1);
 #ifdef USE_SSL
+  Curl_dyn_init(&neg_ctx->channel_binding_data, SSL_CB_MAX_SIZE + 1);
   if(Curl_conn_is_ssl(conn, FIRSTSOCKET)) {
     result = Curl_ssl_get_channel_binding(
       data, FIRSTSOCKET, &neg_ctx->channel_binding_data);
@@ -120,6 +120,8 @@ CURLcode Curl_input_negotiate(struct Curl_easy *data, struct connectdata *conn,
       return result;
     }
   }
+#else
+  Curl_dyn_init(&neg_ctx->channel_binding_data, 1);
 #endif /* USE_SSL */
 #endif /* HAVE_GSSAPI */