aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_ntlm_core.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-08-28 07:15:46 +0200
committerYang Tse <yangsita@gmail.com>2011-08-28 07:15:46 +0200
commit05ef245170fd71f2907b89e2d1361b2e70113199 (patch)
tree75151e8e0c8cd79a98988aa230f94e0535945204 /lib/curl_ntlm_core.h
parent662c1d87f3933a7deece63d484f4c0c248a13ded (diff)
NTLM: header inclusion cleanup
Diffstat (limited to 'lib/curl_ntlm_core.h')
-rw-r--r--lib/curl_ntlm_core.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h
index ea855905f..5615b3504 100644
--- a/lib/curl_ntlm_core.h
+++ b/lib/curl_ntlm_core.h
@@ -22,7 +22,32 @@
*
***************************************************************************/
-#ifdef USE_NTLM
+#include "setup.h"
+
+#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI)
+
+#ifdef USE_SSLEAY
+# if !defined(OPENSSL_VERSION_NUMBER) && \
+ !defined(HEADER_SSL_H) && !defined(HEADER_MD5_H)
+# error "curl_ntlm_core.h shall not be included before OpenSSL headers."
+# endif
+# ifdef OPENSSL_NO_MD4
+# define USE_NTRESPONSES 0
+# define USE_NTLM2SESSION 0
+# endif
+#endif
+
+/*
+ * Define USE_NTRESPONSES to 1 in order to make the type-3 message include
+ * the NT response message. Define USE_NTLM2SESSION to 1 in order to make
+ * the type-3 message include the NTLM2Session response message, requires
+ * USE_NTRESPONSES defined to 1.
+ */
+
+#ifndef USE_NTRESPONSES
+# define USE_NTRESPONSES 1
+# define USE_NTLM2SESSION 1
+#endif
void Curl_ntlm_core_lm_resp(const unsigned char *keys,
const unsigned char *plaintext,
@@ -32,12 +57,12 @@ void Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data,
const char *password,
unsigned char *lmbuffer /* 21 bytes */);
-#if !defined(USE_WINDOWS_SSPI) && (USE_NTRESPONSES != 0)
+#if USE_NTRESPONSES
CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data,
const char *password,
unsigned char *ntbuffer /* 21 bytes */);
#endif
-#endif /* USE_NTLM */
+#endif /* USE_NTLM && !USE_WINDOWS_SSPI */
#endif /* HEADER_CURL_NTLM_CORE_H */