]> granicus.if.org Git - curl/commitdiff
smb: Fixed Windows autoconf builds following commit eb88d778e7
authorSteve Holme <steve_holme@hotmail.com>
Sun, 7 Dec 2014 20:44:57 +0000 (20:44 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 7 Dec 2014 20:47:54 +0000 (20:47 +0000)
As Windows based autoconf builds don't yet define USE_WIN32_CRYPTO
either explicitly through --enable-win32-cypto or automatically on
_WIN32 based platforms, subsequent builds broke with the following
error message:

"Can't compile NTLM support without a crypto library."

lib/curl_ntlm_core.c
lib/curl_ntlm_core.h
lib/smb.c
lib/smb.h
lib/url.c
lib/version.c

index ee015398ce0bdbef5645813c766accdff5cd13a5..9eb92ecb68d063dfb49bb4d96012df808d7f18d6 100644 (file)
@@ -31,6 +31,8 @@
  * http://www.innovation.ch/java/ntlm.html
  */
 
+#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
+
 #ifdef USE_SSLEAY
 
 #  ifdef USE_OPENSSL
@@ -734,4 +736,6 @@ CURLcode  Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
 
 #endif /* USE_NTRESPONSES */
 
+#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
+
 #endif /* USE_NTLM */
index 5e89ef056c940f7d9134189968f3236fa89ef6cd..a600f0a7fc804fa7c747dfb455bf674b53806015 100644 (file)
@@ -26,6 +26,8 @@
 
 #if defined(USE_NTLM)
 
+#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
+
 #ifdef USE_SSLEAY
 #  if !defined(OPENSSL_VERSION_NUMBER) && \
       !defined(HEADER_SSL_H) && !defined(HEADER_MD5_H)
@@ -90,6 +92,8 @@ CURLcode  Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
 
 #endif /* USE_NTRESPONSES */
 
+#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
+
 #endif /* USE_NTLM */
 
 #endif /* HEADER_CURL_NTLM_CORE_H */
index 7627c8943bdd0634834ebddff46583a8418daa66..2b2781aca062d7f3221afc6eef8faff928da9cd2 100644 (file)
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -24,6 +24,8 @@
 
 #if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM)
 
+#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
+
 #define BUILDING_CURL_SMB_C
 
 #ifdef _WIN32
@@ -894,4 +896,6 @@ static CURLcode smb_parse_url_path(struct connectdata *conn)
   return CURLE_OK;
 }
 
+#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
+
 #endif /* CURL_DISABLE_SMB && USE_NTLM */
index ff1a812e38037b4ed30268af6d828068d653388e..233f4abd602c625e744ebbc195c198667fc3834c 100644 (file)
--- a/lib/smb.h
+++ b/lib/smb.h
@@ -258,9 +258,13 @@ struct smb_tree_disconnect {
 
 #if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM)
 
+#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
+
 extern const struct Curl_handler Curl_handler_smb;
 extern const struct Curl_handler Curl_handler_smbs;
 
+#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
+
 #endif /* CURL_DISABLE_SMB && USE_NTLM */
 
 #endif /* HEADER_CURL_SMB_H */
index 8b4f3a95cc3660ce86073d0bfed94b4e60251be6..9996dd52767735d74581eb06098a2bcbd73e2f8b 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -220,7 +220,8 @@ static const struct Curl_handler * const protocols[] = {
 #endif
 #endif
 
-#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM)
+#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \
+   (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO))
   &Curl_handler_smb,
 #ifdef USE_SSL
   &Curl_handler_smbs,
index 4b583e8e53c14976de4fdf8cd4cd6dcf19fc49ae..83143f402e0ec2564330ceeba34301360b00f84d 100644 (file)
@@ -216,7 +216,8 @@ static const char * const protocols[] = {
 #ifdef USE_LIBSSH2
   "sftp",
 #endif
-#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM)
+#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \
+   (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO))
   "smb",
 #  ifdef USE_SSL
   "smbs",