Skip to content

Compile libCurl with CURL_DISABLE_CRYPTO_AUTH and USE_NTLM causes curl_sasl.c to fail to compile #1487

@wyattoday

Description

@wyattoday

I did this

Defined both CURL_DISABLE_CRYPTO_AUTH and USE_NTLM.

I expected the following

A successful compilation. Instead I got an error saying "serverdata" was undefined (because it was being "defined" out).

curl/libcurl version

7.54.0

operating system

Windows, Visual Studio 2017.

Solution:

In curl_sasl.c, around line 417-ish (in Curl_sasl_continue() ), move char *serverdata; outside of the the #if !defined(CURL_DISABLE_CRYPTO_AUTH) define.

Or, alternatively, replace this:

#if !defined(CURL_DISABLE_CRYPTO_AUTH)
  char *serverdata;
  char *chlg = NULL;
  size_t chlglen = 0;
#endif

With this:

#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_NTLM) || defined(USE_KERBEROS5)
  char *serverdata;
#endif

#if !defined(CURL_DISABLE_CRYPTO_AUTH)
  char *chlg = NULL;
  size_t chlglen = 0;
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions