masqmail

changeset 363:02bc0331e390

Removed support for openssl linking It had been rarely used and could have caused legal problems. For explanations, see this mail message: Date: Sun, 04 Sep 2011 17:35:23 +0200 From: markus schnalke <meillo@marmaro.de> To: masqmail@marmaro.de Subject: [masqmail] RFC: Removal of configure options Message-ID: <1R0EjD-4aX-00@serveme.home.schnalke.org>
author markus schnalke <meillo@marmaro.de>
date Wed, 14 Sep 2011 12:07:34 +0200
parents 9d49dffc3070
children 72653295b75d
files INSTALL acconfig.h config.h.in configure configure.ac src/smtp_out.c
diffstat 6 files changed, 2 insertions(+), 112 deletions(-) [+]
line diff
     1.1 --- a/INSTALL	Wed Sep 14 11:50:45 2011 +0200
     1.2 +++ b/INSTALL	Wed Sep 14 12:07:34 2011 +0200
     1.3 @@ -85,13 +85,6 @@
     1.4  mail without a smart host. Not recommended.
     1.5  
     1.6  
     1.7 ---with-libcryto
     1.8 -instead of using the md5 and hmac functions within the package, link
     1.9 -dynamically with libcrypto. This applies only if you have SMTP AUTH
    1.10 -enabled. Only makes sense if your resources are limited and you have
    1.11 -libcrypto installed. Untested.
    1.12 -
    1.13 -
    1.14  --disable-debug
    1.15  disables debugging; setting it on the command line or in the
    1.16  configuration has no effect. Strongly discouraged, since you miss
     2.1 --- a/acconfig.h	Wed Sep 14 11:50:45 2011 +0200
     2.2 +++ b/acconfig.h	Wed Sep 14 12:07:34 2011 +0200
     2.3 @@ -10,8 +10,6 @@
     2.4  
     2.5  #undef ENABLE_AUTH
     2.6  
     2.7 -#undef USE_LIB_CRYPTO
     2.8 -
     2.9  #undef ENABLE_IDENT
    2.10  
    2.11  #undef CONF_DIR
     3.1 --- a/config.h.in	Wed Sep 14 11:50:45 2011 +0200
     3.2 +++ b/config.h.in	Wed Sep 14 12:07:34 2011 +0200
     3.3 @@ -11,8 +11,6 @@
     3.4  
     3.5  #undef ENABLE_AUTH
     3.6  
     3.7 -#undef USE_LIB_CRYPTO
     3.8 -
     3.9  #undef ENABLE_IDENT
    3.10  
    3.11  #undef CONF_DIR
    3.12 @@ -156,9 +154,6 @@
    3.13  /* If liblockfile is to be used */
    3.14  #undef USE_LIBLOCKFILE
    3.15  
    3.16 -/* If libcrypto is available */
    3.17 -#undef USE_LIB_CRYPTO
    3.18 -
    3.19  /* Version number of package */
    3.20  #undef VERSION
    3.21  
     4.1 --- a/configure	Wed Sep 14 11:50:45 2011 +0200
     4.2 +++ b/configure	Wed Sep 14 12:07:34 2011 +0200
     4.3 @@ -713,7 +713,6 @@
     4.4  with_group
     4.5  enable_debug
     4.6  enable_auth
     4.7 -with_libcrypto
     4.8  enable_ident
     4.9  with_liblockfile
    4.10  with_logdir
    4.11 @@ -1362,7 +1361,6 @@
    4.12    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    4.13    --with-user=USER        set user mail
    4.14    --with-group=GROUP      set group mail
    4.15 -  --with-libcrypto        use libcrypto (usually not needed)
    4.16    --with-liblockfile      use liblock (for Debian)
    4.17    --with-logdir=DIR       set log directory /var/log/masqmail
    4.18    --with-spooldir=DIR     set spool directory /var/spool/masqmail
    4.19 @@ -5173,69 +5171,8 @@
    4.20  fi
    4.21  
    4.22  
    4.23 -
    4.24 -# Check whether --with-libcrypto was given.
    4.25 -if test "${with_libcrypto+set}" = set; then :
    4.26 -  withval=$with_libcrypto;
    4.27 -fi
    4.28 -
    4.29 -if test "x$with_libcrypto" != 'xyes'; then
    4.30 -	with_libcrypto='no'
    4.31 -fi
    4.32 -
    4.33  if test "x$need_md5" = 'xyes'; then
    4.34 -	if test "x$with_libcrypto" = "xyes"; then
    4.35 -		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5 in -lcrypto" >&5
    4.36 -$as_echo_n "checking for MD5 in -lcrypto... " >&6; }
    4.37 -if ${ac_cv_lib_crypto_MD5+:} false; then :
    4.38 -  $as_echo_n "(cached) " >&6
    4.39 -else
    4.40 -  ac_check_lib_save_LIBS=$LIBS
    4.41 -LIBS="-lcrypto  $LIBS"
    4.42 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    4.43 -/* end confdefs.h.  */
    4.44 -
    4.45 -/* Override any GCC internal prototype to avoid an error.
    4.46 -   Use char because int might match the return type of a GCC
    4.47 -   builtin and then its argument prototype would still apply.  */
    4.48 -#ifdef __cplusplus
    4.49 -extern "C"
    4.50 -#endif
    4.51 -char MD5 ();
    4.52 -int
    4.53 -main ()
    4.54 -{
    4.55 -return MD5 ();
    4.56 -  ;
    4.57 -  return 0;
    4.58 -}
    4.59 -_ACEOF
    4.60 -if ac_fn_c_try_link "$LINENO"; then :
    4.61 -  ac_cv_lib_crypto_MD5=yes
    4.62 -else
    4.63 -  ac_cv_lib_crypto_MD5=no
    4.64 -fi
    4.65 -rm -f core conftest.err conftest.$ac_objext \
    4.66 -    conftest$ac_exeext conftest.$ac_ext
    4.67 -LIBS=$ac_check_lib_save_LIBS
    4.68 -fi
    4.69 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5" >&5
    4.70 -$as_echo "$ac_cv_lib_crypto_MD5" >&6; }
    4.71 -if test "x$ac_cv_lib_crypto_MD5" = xyes; then :
    4.72 -  has_crypto='yes'
    4.73 -else
    4.74 -  as_fn_error $? "'no libcrypto'" "$LINENO" 5
    4.75 -fi
    4.76 -
    4.77 -		if test "x$has_crypto" = 'xyes'; then
    4.78 -
    4.79 -$as_echo "#define USE_LIB_CRYPTO 1" >>confdefs.h
    4.80 -
    4.81 -			MD5_LIBS='-lcrypto'
    4.82 -		fi
    4.83 -	else
    4.84 -		MD5_LIBS='md5/libmd5.a'
    4.85 -	fi
    4.86 +	MD5_LIBS='md5/libmd5.a'
    4.87  fi
    4.88  
    4.89  
     5.1 --- a/configure.ac	Wed Sep 14 11:50:45 2011 +0200
     5.2 +++ b/configure.ac	Wed Sep 14 12:07:34 2011 +0200
     5.3 @@ -136,25 +136,8 @@
     5.4  fi
     5.5  AC_SUBST(BASE64_LIBS)
     5.6  
     5.7 -dnl libcrypto
     5.8 -AC_ARG_WITH(libcrypto,
     5.9 -	[  --with-libcrypto        use libcrypto (usually not needed)],
    5.10 -	)
    5.11 -if test "x$with_libcrypto" != 'xyes'; then
    5.12 -	with_libcrypto='no'
    5.13 -fi
    5.14 -
    5.15  if test "x$need_md5" = 'xyes'; then
    5.16 -dnl check whether we have md5 in libcrypto if md5 needed and we shall link with libcrypto
    5.17 -	if test "x$with_libcrypto" = "xyes"; then
    5.18 -		AC_CHECK_LIB(crypto, MD5, has_crypto='yes', AC_MSG_ERROR('no libcrypto'))
    5.19 -		if test "x$has_crypto" = 'xyes'; then
    5.20 -			AC_DEFINE(USE_LIB_CRYPTO, 1, [If libcrypto is available])
    5.21 -			MD5_LIBS='-lcrypto'
    5.22 -		fi
    5.23 -	else
    5.24 -		MD5_LIBS='md5/libmd5.a'
    5.25 -	fi
    5.26 +	MD5_LIBS='md5/libmd5.a'
    5.27  fi
    5.28  AC_SUBST(MD5_LIBS)
    5.29  
     6.1 --- a/src/smtp_out.c	Wed Sep 14 11:50:45 2011 +0200
     6.2 +++ b/src/smtp_out.c	Wed Sep 14 12:07:34 2011 +0200
     6.3 @@ -31,16 +31,8 @@
     6.4  #include "readsock.h"
     6.5  
     6.6  #ifdef ENABLE_AUTH
     6.7 -
     6.8 -#ifdef USE_LIB_CRYPTO
     6.9 -#include <openssl/hmac.h>
    6.10 -#include <openssl/md5.h>
    6.11 -#include <openssl/evp.h>
    6.12 -#else
    6.13  #include "md5/md5.h"
    6.14  #include "md5/hmac_md5.h"
    6.15 -#endif
    6.16 -
    6.17  #include "base64/base64.h"
    6.18  #endif
    6.19  
    6.20 @@ -567,21 +559,13 @@
    6.21  			guchar digest[16], *reply64, *reply;
    6.22  			gchar digest_string[33];
    6.23  			gint i;
    6.24 -#ifdef USE_LIB_CRYPTO
    6.25 -			unsigned int digest_len;
    6.26 -#endif
    6.27  
    6.28  			DEBUG(5) debugf("smtp_out_auth_cram_md5():\n");
    6.29  			DEBUG(5) debugf("  encoded challenge = %s\n", chall64);
    6.30  			DEBUG(5) debugf("  decoded challenge = %s, size = %d\n", chall, chall_size);
    6.31  			DEBUG(5) debugf("  secret = %s\n", psb->auth_secret);
    6.32  
    6.33 -#ifdef USE_LIB_CRYPTO
    6.34 -			HMAC(EVP_md5(), psb->auth_secret, strlen(psb->auth_secret), chall, chall_size, digest, &digest_len);
    6.35 -#else
    6.36  			hmac_md5(chall, chall_size, psb->auth_secret, strlen(psb->auth_secret), digest);
    6.37 -#endif
    6.38 -
    6.39  			for (i = 0; i < 16; i++)
    6.40  				sprintf(&(digest_string[i + i]), "%02x", (unsigned int) (digest[i]));
    6.41  			digest_string[32] = '\0';