summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/vauth
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-20 17:09:59 (GMT)
committerBrad King <brad.king@kitware.com>2023-09-22 14:55:37 (GMT)
commitc1f76e6c211e9e562328f1c0571e8877599f880e (patch)
treef4c879a444b512b178f89ccd5b1c0f4a0db4ee99 /Utilities/cmcurl/lib/vauth
parent1fb19cbdad18011756945f84d19951a199a399bc (diff)
parent017637e40f954e791a895a04855d0411bda61c10 (diff)
downloadCMake-c1f76e6c211e9e562328f1c0571e8877599f880e.zip
CMake-c1f76e6c211e9e562328f1c0571e8877599f880e.tar.gz
CMake-c1f76e6c211e9e562328f1c0571e8877599f880e.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2023-09-13 (6fa1d817) Upstream significantly refactored `lib/CMakeLists.txt`, so take the upstream version of everything except the code added by commit 54cb23c657 (curl: Restore installation of OpenSSL DLLs, 2014-11-03, v3.2.0-rc1~418^2~4). We will apply our customizations again in a follow-up commit.
Diffstat (limited to 'Utilities/cmcurl/lib/vauth')
-rw-r--r--Utilities/cmcurl/lib/vauth/cram.c4
-rw-r--r--Utilities/cmcurl/lib/vauth/digest.c6
-rw-r--r--Utilities/cmcurl/lib/vauth/digest.h2
-rw-r--r--Utilities/cmcurl/lib/vauth/digest_sspi.c4
-rw-r--r--Utilities/cmcurl/lib/vauth/ntlm.c13
-rw-r--r--Utilities/cmcurl/lib/vauth/vauth.h6
6 files changed, 12 insertions, 23 deletions
diff --git a/Utilities/cmcurl/lib/vauth/cram.c b/Utilities/cmcurl/lib/vauth/cram.c
index 5894ed4..91fb261 100644
--- a/Utilities/cmcurl/lib/vauth/cram.c
+++ b/Utilities/cmcurl/lib/vauth/cram.c
@@ -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 */
diff --git a/Utilities/cmcurl/lib/vauth/digest.c b/Utilities/cmcurl/lib/vauth/digest.c
index fda2d91..12c6f7d 100644
--- a/Utilities/cmcurl/lib/vauth/digest.c
+++ b/Utilities/cmcurl/lib/vauth/digest.c
@@ -27,7 +27,7 @@
#include "curl_setup.h"
-#if !defined(CURL_DISABLE_CRYPTO_AUTH)
+#ifndef CURL_DISABLE_DIGEST_AUTH
#include <curl/curl.h>
@@ -420,7 +420,7 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
msnprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]);
/* Generate our SPN */
- spn = Curl_auth_build_spn(service, realm, NULL);
+ spn = Curl_auth_build_spn(service, data->conn->host.name, NULL);
if(!spn)
return CURLE_OUT_OF_MEMORY;
@@ -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 */
diff --git a/Utilities/cmcurl/lib/vauth/digest.h b/Utilities/cmcurl/lib/vauth/digest.h
index 68fdb28..99ce1f9 100644
--- a/Utilities/cmcurl/lib/vauth/digest.h
+++ b/Utilities/cmcurl/lib/vauth/digest.h
@@ -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
diff --git a/Utilities/cmcurl/lib/vauth/digest_sspi.c b/Utilities/cmcurl/lib/vauth/digest_sspi.c
index 8fb8669..02e36ea 100644
--- a/Utilities/cmcurl/lib/vauth/digest_sspi.c
+++ b/Utilities/cmcurl/lib/vauth/digest_sspi.c
@@ -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 */
diff --git a/Utilities/cmcurl/lib/vauth/ntlm.c b/Utilities/cmcurl/lib/vauth/ntlm.c
index 93096ba..ed7cee8 100644
--- a/Utilities/cmcurl/lib/vauth/ntlm.c
+++ b/Utilities/cmcurl/lib/vauth/ntlm.c
@@ -45,12 +45,6 @@
#include "rand.h"
#include "vtls/vtls.h"
-/* SSL backend-specific #if branches in this file must be kept in the order
- documented in curl_ntlm_core. */
-#if defined(NTLM_NEEDS_NSS_INIT)
-#include "vtls/nssg.h" /* for Curl_nss_force_init() */
-#endif
-
#define BUILDING_CURL_NTLM_MSGS_C
#include "vauth/vauth.h"
#include "vauth/ntlm.h"
@@ -274,12 +268,7 @@ CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
const unsigned char *type2 = Curl_bufref_ptr(type2ref);
size_t type2len = Curl_bufref_len(type2ref);
-#if defined(NTLM_NEEDS_NSS_INIT)
- /* Make sure the crypto backend is initialized */
- result = Curl_nss_force_init(data);
- if(result)
- return result;
-#elif defined(CURL_DISABLE_VERBOSE_STRINGS)
+#if defined(CURL_DISABLE_VERBOSE_STRINGS)
(void)data;
#endif
diff --git a/Utilities/cmcurl/lib/vauth/vauth.h b/Utilities/cmcurl/lib/vauth/vauth.h
index d8cff24..9da0540 100644
--- a/Utilities/cmcurl/lib/vauth/vauth.h
+++ b/Utilities/cmcurl/lib/vauth/vauth.h
@@ -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 */