diff options
author | Yang Tse <yangsita@gmail.com> | 2008-08-17 01:57:10 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-08-17 01:57:10 +0000 |
commit | 3e61c90dbec53e06fb30b0dc706768b675e665f4 (patch) | |
tree | af41f57942b7991d903665ced5aa85b3ef6295e5 /lib/md5.c | |
parent | ac18b471d253f8d5c69d1044a59753f32bcd663f (diff) | |
download | curl-3e61c90dbec53e06fb30b0dc706768b675e665f4.tar.gz |
Adjust usage of conditional definition of USE_OPENSSL
Diffstat (limited to 'lib/md5.c')
-rw-r--r-- | lib/md5.c | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * 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 @@ -25,10 +25,19 @@ #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. @@ -52,8 +61,6 @@ These notices must be retained in any copies of any part of this documentation and/or software. */ -#include <string.h> - /* UINT4 defines a four byte word */ typedef unsigned int UINT4; @@ -332,11 +339,7 @@ static void Decode (UINT4 *output, (((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" |