# HG changeset patch # User markus schnalke # Date 1315994854 -7200 # Node ID 02bc0331e390b1e912a6bf2776305a7576de5320 # Parent 9d49dffc3070e576e3103e58fe51d82cee306b85 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 To: masqmail@marmaro.de Subject: [masqmail] RFC: Removal of configure options Message-ID: <1R0EjD-4aX-00@serveme.home.schnalke.org> diff -r 9d49dffc3070 -r 02bc0331e390 INSTALL --- a/INSTALL Wed Sep 14 11:50:45 2011 +0200 +++ b/INSTALL Wed Sep 14 12:07:34 2011 +0200 @@ -85,13 +85,6 @@ mail without a smart host. Not recommended. ---with-libcryto -instead of using the md5 and hmac functions within the package, link -dynamically with libcrypto. This applies only if you have SMTP AUTH -enabled. Only makes sense if your resources are limited and you have -libcrypto installed. Untested. - - --disable-debug disables debugging; setting it on the command line or in the configuration has no effect. Strongly discouraged, since you miss diff -r 9d49dffc3070 -r 02bc0331e390 acconfig.h --- a/acconfig.h Wed Sep 14 11:50:45 2011 +0200 +++ b/acconfig.h Wed Sep 14 12:07:34 2011 +0200 @@ -10,8 +10,6 @@ #undef ENABLE_AUTH -#undef USE_LIB_CRYPTO - #undef ENABLE_IDENT #undef CONF_DIR diff -r 9d49dffc3070 -r 02bc0331e390 config.h.in --- a/config.h.in Wed Sep 14 11:50:45 2011 +0200 +++ b/config.h.in Wed Sep 14 12:07:34 2011 +0200 @@ -11,8 +11,6 @@ #undef ENABLE_AUTH -#undef USE_LIB_CRYPTO - #undef ENABLE_IDENT #undef CONF_DIR @@ -156,9 +154,6 @@ /* If liblockfile is to be used */ #undef USE_LIBLOCKFILE -/* If libcrypto is available */ -#undef USE_LIB_CRYPTO - /* Version number of package */ #undef VERSION diff -r 9d49dffc3070 -r 02bc0331e390 configure --- a/configure Wed Sep 14 11:50:45 2011 +0200 +++ b/configure Wed Sep 14 12:07:34 2011 +0200 @@ -713,7 +713,6 @@ with_group enable_debug enable_auth -with_libcrypto enable_ident with_liblockfile with_logdir @@ -1362,7 +1361,6 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-user=USER set user mail --with-group=GROUP set group mail - --with-libcrypto use libcrypto (usually not needed) --with-liblockfile use liblock (for Debian) --with-logdir=DIR set log directory /var/log/masqmail --with-spooldir=DIR set spool directory /var/spool/masqmail @@ -5173,69 +5171,8 @@ fi - -# Check whether --with-libcrypto was given. -if test "${with_libcrypto+set}" = set; then : - withval=$with_libcrypto; -fi - -if test "x$with_libcrypto" != 'xyes'; then - with_libcrypto='no' -fi - if test "x$need_md5" = 'xyes'; then - if test "x$with_libcrypto" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5 in -lcrypto" >&5 -$as_echo_n "checking for MD5 in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_MD5+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MD5 (); -int -main () -{ -return MD5 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_MD5=yes -else - ac_cv_lib_crypto_MD5=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5" >&5 -$as_echo "$ac_cv_lib_crypto_MD5" >&6; } -if test "x$ac_cv_lib_crypto_MD5" = xyes; then : - has_crypto='yes' -else - as_fn_error $? "'no libcrypto'" "$LINENO" 5 -fi - - if test "x$has_crypto" = 'xyes'; then - -$as_echo "#define USE_LIB_CRYPTO 1" >>confdefs.h - - MD5_LIBS='-lcrypto' - fi - else - MD5_LIBS='md5/libmd5.a' - fi + MD5_LIBS='md5/libmd5.a' fi diff -r 9d49dffc3070 -r 02bc0331e390 configure.ac --- a/configure.ac Wed Sep 14 11:50:45 2011 +0200 +++ b/configure.ac Wed Sep 14 12:07:34 2011 +0200 @@ -136,25 +136,8 @@ fi AC_SUBST(BASE64_LIBS) -dnl libcrypto -AC_ARG_WITH(libcrypto, - [ --with-libcrypto use libcrypto (usually not needed)], - ) -if test "x$with_libcrypto" != 'xyes'; then - with_libcrypto='no' -fi - if test "x$need_md5" = 'xyes'; then -dnl check whether we have md5 in libcrypto if md5 needed and we shall link with libcrypto - if test "x$with_libcrypto" = "xyes"; then - AC_CHECK_LIB(crypto, MD5, has_crypto='yes', AC_MSG_ERROR('no libcrypto')) - if test "x$has_crypto" = 'xyes'; then - AC_DEFINE(USE_LIB_CRYPTO, 1, [If libcrypto is available]) - MD5_LIBS='-lcrypto' - fi - else - MD5_LIBS='md5/libmd5.a' - fi + MD5_LIBS='md5/libmd5.a' fi AC_SUBST(MD5_LIBS) diff -r 9d49dffc3070 -r 02bc0331e390 src/smtp_out.c --- a/src/smtp_out.c Wed Sep 14 11:50:45 2011 +0200 +++ b/src/smtp_out.c Wed Sep 14 12:07:34 2011 +0200 @@ -31,16 +31,8 @@ #include "readsock.h" #ifdef ENABLE_AUTH - -#ifdef USE_LIB_CRYPTO -#include -#include -#include -#else #include "md5/md5.h" #include "md5/hmac_md5.h" -#endif - #include "base64/base64.h" #endif @@ -567,21 +559,13 @@ guchar digest[16], *reply64, *reply; gchar digest_string[33]; gint i; -#ifdef USE_LIB_CRYPTO - unsigned int digest_len; -#endif DEBUG(5) debugf("smtp_out_auth_cram_md5():\n"); DEBUG(5) debugf(" encoded challenge = %s\n", chall64); DEBUG(5) debugf(" decoded challenge = %s, size = %d\n", chall, chall_size); DEBUG(5) debugf(" secret = %s\n", psb->auth_secret); -#ifdef USE_LIB_CRYPTO - HMAC(EVP_md5(), psb->auth_secret, strlen(psb->auth_secret), chall, chall_size, digest, &digest_len); -#else hmac_md5(chall, chall_size, psb->auth_secret, strlen(psb->auth_secret), digest); -#endif - for (i = 0; i < 16; i++) sprintf(&(digest_string[i + i]), "%02x", (unsigned int) (digest[i])); digest_string[32] = '\0';