#ifndef USE_WINDOWS_SSPI
-#include <openssl/des.h>
-#include <openssl/md4.h>
-#include <openssl/md5.h>
-#include <openssl/ssl.h>
-#include <openssl/rand.h>
+# ifdef USE_SSLEAY
+# ifdef USE_OPENSSL
+# include <openssl/des.h>
+# include <openssl/md4.h>
+# include <openssl/md5.h>
+# include <openssl/ssl.h>
+# include <openssl/rand.h>
+# else
+# include <des.h>
+# include <md4.h>
+# include <md5.h>
+# include <ssl.h>
+# include <rand.h>
+# endif
+# else
+# error "Can't compile NTLM support without OpenSSL."
+# endif
#if OPENSSL_VERSION_NUMBER < 0x00907001L
#define DES_key_schedule des_key_schedule
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
#ifndef CURL_DISABLE_CRYPTO_AUTH
-#if !defined(USE_SSLEAY) || !defined(USE_OPENSSL)
-/* This code segment is only used if OpenSSL is not provided, as if it is
- we use the MD5-function provided there instead. No good duplicating
- code! */
+#include <string.h>
+
+#ifdef USE_SSLEAY
+/* When OpenSSL is available we use the MD5-function from OpenSSL */
+
+# ifdef USE_OPENSSL
+# include <openssl/md5.h>
+# else
+# include <md5.h>
+# endif
+
+#else /* USE_SSLEAY */
+/* When OpenSSL is not available we use this code segment */
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
documentation and/or software.
*/
-#include <string.h>
-
/* UINT4 defines a four byte word */
typedef unsigned int UINT4;
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}
-#else
-/* If OpenSSL is present */
-#include <openssl/md5.h>
-#include <string.h>
-#endif
+#endif /* USE_SSLEAY */
#include "curl_md5.h"