diff options
author | Viktor Szakats <vszakats@users.noreply.github.com> | 2017-08-30 21:10:38 +0000 |
---|---|---|
committer | Viktor Szakats <vszakats@users.noreply.github.com> | 2017-09-22 19:01:28 +0000 |
commit | 6f86022df26243cc8a035fe8b4c89033b6a04bc0 (patch) | |
tree | a18d9ba9de9668fd3034e62a2a66908d835b3ed3 /lib/vauth | |
parent | 7c52b12dd4721d4c5591cefa078d256331e56999 (diff) | |
download | curl-6f86022df26243cc8a035fe8b4c89033b6a04bc0.tar.gz |
ntlm: use strict order for SSL backend #if branches
With the recently introduced MultiSSL support multiple SSL backends
can be compiled into cURL That means that now the order of the SSL
One option would be to use the same SSL backend as was configured
via `curl_global_sslset()`, however, NTLMv2 support would appear
to be available only with some SSL backends. For example, when
eb88d778e (ntlm: Use Windows Crypt API, 2014-12-02) introduced
support for NTLMv1 using Windows' Crypt API, it specifically did
*not* introduce NTLMv2 support using Crypt API at the same time.
So let's select one specific SSL backend for NTLM support when
compiled with multiple SSL backends, using a priority order such
that we support NTLMv2 even if only one compiled-in SSL backend can
be used for that.
Ref: https://github.com/curl/curl/pull/1848
Diffstat (limited to 'lib/vauth')
-rw-r--r-- | lib/vauth/ntlm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c index d38208ed7..50d922208 100644 --- a/lib/vauth/ntlm.c +++ b/lib/vauth/ntlm.c @@ -44,7 +44,9 @@ #include "rand.h" #include "vtls/vtls.h" -#ifdef USE_NSS +/* 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 @@ -272,7 +274,7 @@ CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data, unsigned char *type2 = NULL; size_t type2_len = 0; -#if defined(USE_NSS) +#if defined(NTLM_NEEDS_NSS_INIT) /* Make sure the crypto backend is initialized */ result = Curl_nss_force_init(data); if(result) |