lib: add ability to disable auths individually

Both with configure and cmake

Closes #11490
This commit is contained in:
Wyatt O'Day 2023-07-20 10:09:04 -04:00 committed by Daniel Stenberg
parent 33dac9dfac
commit e92edfbef6
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
33 changed files with 266 additions and 76 deletions

View file

@ -26,7 +26,7 @@
#include "curl_setup.h"
#if !defined(CURL_DISABLE_CRYPTO_AUTH)
#ifndef CURL_DISABLE_DIGEST_AUTH
#include <curl/curl.h>
#include "urldata.h"
@ -94,4 +94,4 @@ CURLcode Curl_auth_create_cram_md5_message(const struct bufref *chlg,
return CURLE_OK;
}
#endif /* !CURL_DISABLE_CRYPTO_AUTH */
#endif /* !CURL_DISABLE_DIGEST_AUTH */

View file

@ -27,7 +27,7 @@
#include "curl_setup.h"
#if !defined(CURL_DISABLE_CRYPTO_AUTH)
#ifndef CURL_DISABLE_DIGEST_AUTH
#include <curl/curl.h>
@ -992,4 +992,4 @@ void Curl_auth_digest_cleanup(struct digestdata *digest)
}
#endif /* !USE_WINDOWS_SSPI */
#endif /* CURL_DISABLE_CRYPTO_AUTH */
#endif /* !CURL_DISABLE_DIGEST_AUTH */

View file

@ -26,7 +26,7 @@
#include <curl/curl.h>
#if !defined(CURL_DISABLE_CRYPTO_AUTH)
#ifndef CURL_DISABLE_DIGEST_AUTH
#define DIGEST_MAX_VALUE_LENGTH 256
#define DIGEST_MAX_CONTENT_LENGTH 1024

View file

@ -27,7 +27,7 @@
#include "curl_setup.h"
#if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_CRYPTO_AUTH)
#if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_DIGEST_AUTH)
#include <curl/curl.h>
@ -665,4 +665,4 @@ void Curl_auth_digest_cleanup(struct digestdata *digest)
Curl_safefree(digest->passwd);
}
#endif /* USE_WINDOWS_SSPI && !CURL_DISABLE_CRYPTO_AUTH */
#endif /* USE_WINDOWS_SSPI && !CURL_DISABLE_DIGEST_AUTH */

View file

@ -30,7 +30,7 @@
struct Curl_easy;
#if !defined(CURL_DISABLE_CRYPTO_AUTH)
#if !defined(CURL_DISABLE_DIGEST_AUTH)
struct digestdata;
#endif
@ -86,7 +86,7 @@ CURLcode Curl_auth_create_login_message(const char *value,
CURLcode Curl_auth_create_external_message(const char *user,
struct bufref *out);
#if !defined(CURL_DISABLE_CRYPTO_AUTH)
#ifndef CURL_DISABLE_DIGEST_AUTH
/* This is used to generate a CRAM-MD5 response message */
CURLcode Curl_auth_create_cram_md5_message(const struct bufref *chlg,
const char *userp,
@ -119,7 +119,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
/* This is used to clean up the digest specific data */
void Curl_auth_digest_cleanup(struct digestdata *digest);
#endif /* !CURL_DISABLE_CRYPTO_AUTH */
#endif /* !CURL_DISABLE_DIGEST_AUTH */
#ifdef USE_GSASL
/* This is used to evaluate if MECH is supported by gsasl */