]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
negotiate: conditional check around GSS & SSL specific code
authorJon Rumsey <jrumsey@uk.ibm.com>
Wed, 18 Sep 2024 09:31:25 +0000 (10:31 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 18 Sep 2024 13:04:06 +0000 (15:04 +0200)
Fixes #14938
Reported-by: lomberd2 on github
Fixes #14952
Closes #14954

lib/http_negotiate.c

index 26e475c27342b118dcc9a9c3de4b8a58ea56011a..5dda475057f082ae2b47f1a927af304ed9c58d66 100644 (file)
@@ -108,7 +108,7 @@ CURLcode Curl_input_negotiate(struct Curl_easy *data, struct connectdata *conn,
   neg_ctx->sslContext = conn->sslContext;
 #endif
   /* Check if the connection is using SSL and get the channel binding data */
-#ifdef HAVE_GSSAPI
+#if defined(USE_SSL) && defined(HAVE_GSSAPI)
   if(conn->handler->flags & PROTOPT_SSL) {
     Curl_dyn_init(&neg_ctx->channel_binding_data, SSL_CB_MAX_SIZE);
     result = Curl_ssl_get_channel_binding(
@@ -124,7 +124,7 @@ CURLcode Curl_input_negotiate(struct Curl_easy *data, struct connectdata *conn,
   result = Curl_auth_decode_spnego_message(data, userp, passwdp, service,
                                            host, header, neg_ctx);
 
-#ifdef HAVE_GSSAPI
+#if defined(USE_SSL) && defined(HAVE_GSSAPI)
   Curl_dyn_free(&neg_ctx->channel_binding_data);
 #endif