Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 222483 | Differences between
and this patch

Collapse All | Expand All

(-)eggdrop1.6.19/aclocal.m4 (+58 lines)
Lines 37-42 Link Here
37
])
37
])
38
38
39
39
40
dnl  EGG_SSL_CRAP()
41
dnl
42
AC_DEFUN(EGG_SSL_CRAP, [dnl
43
#ssl checks
44
AC_MSG_CHECKING(whether to include SSL support)
45
AC_ARG_WITH(ssl,
46
[  --with-ssl[=PATH]         Include SSL support (DIR is OpenSSL's install dir).],
47
[
48
  case "$withval" in
49
    no)
50
      AC_MSG_RESULT(no) ;;
51
    yes)
52
      AC_MSG_RESULT(yes)
53
      AC_CHECK_LIB(ssl,SSL_accept,[AC_DEFINE(EGG_SSL_EXT)
54
      SSL_LIBS="-lssl -lcrypto"],[AC_MSG_ERROR([You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL])],-lcrypto)
55
      ;;
56
    *)
57
dnl A whole whack of possible places where this might be
58
      test -f $withval/openssl/ssl.h && SSL_INCLUDE="$withval"
59
      test -f $withval/include/openssl/ssl.h && SSL_INCLUDE="$withval/include"
60
61
      test -f $withval/lib/libssl.a && SSL_LIB="$withval/lib"
62
      test -f $withval/lib/ssl/libssl.a && SSL_LIB="$withval/lib/ssl"
63
      test -f $withval/lib/openssl/libssl.a && SSL_LIB="$withval/lib/openssl/ssl"
64
      test -f $withval/libssl.a && SSL_LIB="$withval"
65
      test -f $withval/ssl/libssl.a && SSL_LIB="$withval/ssl"
66
      test -f $withval/openssl/libssl.a && SSL_LIB="$withval/openssl"
67
68
      test -f $withval/lib/libcrypto.a && CRYPTO_LIB="$withval/lib"
69
      test -f $withval/lib/ssl/libcrypto.a && CRYPTO_LIB="$withval/lib/ssl"
70
      test -f $withval/lib/openssl/libcrypto.a && CRYPTO_LIB="$withval/lib/openssl/ssl"
71
      test -f $withval/libcrypto.a && CRYPTO_LIB="$withval"
72
      test -f $withval/ssl/libcrypto.a && CRYPTO_LIB="$withval/ssl"
73
      test -f $withval/openssl/libcrypto.a && CRYPTO_LIB="$withval/openssl"
74
75
      if test -n "$SSL_INCLUDE" && test -n "$SSL_LIB" && test -n "$CRYPTO_LIB"; then
76
        SSL_LIBS="-lssl -lcrypto -L$SSL_LIB -L$CRYPTO_LIB";
77
        AC_DEFINE(EGG_SSL_EXT)
78
        AC_MSG_RESULT(yes)
79
      else
80
        AC_MSG_RESULT(no)
81
        AC_MSG_ERROR([You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL])
82
      fi ;;
83
  esac
84
],[
85
    AC_MSG_RESULT(will try to find)
86
    AC_CHECK_LIB(ssl,SSL_accept,[AC_DEFINE(EGG_SSL_EXT)
87
     SSL_LIBS="-lssl -lcrypto"],[AC_MSG_ERROR([OpenSSL was not found. Please supply a pathname to OpenSSL])],-lcrypto)
88
    AC_CHECK_HEADERS("openssl/ssl.h",,[AC_MSG_ERROR([OpenSSL was not found. Please supply a pathname to OpenSSL])],)
89
90
    AC_SUBST(SSL_LIBS)dnl
91
    AC_SUBST(SSL_INCLUDE)dnl
92
])
93
94
#end of ssl checks
95
])dnl
96
97
40
dnl EGG_MSG_CONFIGURE_END()
98
dnl EGG_MSG_CONFIGURE_END()
41
dnl
99
dnl
42
AC_DEFUN([EGG_MSG_CONFIGURE_END],
100
AC_DEFUN([EGG_MSG_CONFIGURE_END],
(-)eggdrop1.6.19/config.h.in (+3 lines)
Lines 33-38 Link Here
33
/* Define to 1 if you have the `clock' function. */
33
/* Define to 1 if you have the `clock' function. */
34
#undef HAVE_CLOCK
34
#undef HAVE_CLOCK
35
35
36
/* Defines ssl mode  */
37
#undef EGG_SSL_EXT 
38
36
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
39
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
37
   */
40
   */
38
#undef HAVE_DIRENT_H
41
#undef HAVE_DIRENT_H
(-)eggdrop1.6.19/configure (-5 / +373 lines)
Lines 315-321 Link Here
315
# include <unistd.h>
315
# include <unistd.h>
316
#endif"
316
#endif"
317
317
318
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS egg_ac_parameters CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB LN_S HEAD_1 STRIP AWK BASENAME UNAME DEFAULT_MAKE MOD_EXT MODULE_XLIBS MOD_LD MOD_CC MOD_STRIP SHLIB_LD SHLIB_CC SHLIB_STRIP EGGEXEC TCLLIB TCLLIBFN TCLINC TCLINCFN TCL_REQS TCL_LIBS EGGVERSION DEST MOD_UPDIR LIBOBJS LTLIBOBJS'
318
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS egg_ac_parameters CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB LN_S HEAD_1 STRIP AWK BASENAME UNAME DEFAULT_MAKE MOD_EXT MODULE_XLIBS MOD_LD MOD_CC MOD_STRIP SHLIB_LD SHLIB_CC SHLIB_STRIP EGGEXEC TCLLIB TCLLIBFN TCLINC TCLINCFN TCL_REQS TCL_LIBS SSL_LIBS SSL_INCLUDE EGGVERSION DEST MOD_UPDIR LIBOBJS LTLIBOBJS'
319
ac_subst_files=''
319
ac_subst_files=''
320
320
321
# Initialize some variables set by options.
321
# Initialize some variables set by options.
Lines 856-861 Link Here
856
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
856
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
857
  --with-tcllib=PATH      full path to Tcl library
857
  --with-tcllib=PATH      full path to Tcl library
858
  --with-tclinc=PATH      full path to Tcl header
858
  --with-tclinc=PATH      full path to Tcl header
859
  --with-ssl=PATH         Include SSL support (DIR is OpenSSL's install dir).
859
860
860
Some influential environment variables:
861
Some influential environment variables:
861
  CC          C compiler command
862
  CC          C compiler command
Lines 8471-8476 Link Here
8471
rm -f conftest*
8472
rm -f conftest*
8472
8473
8473
8474
8475
#ssl checks
8476
echo "$as_me:$LINENO: checking whether to include SSL support" >&5
8477
echo $ECHO_N "checking whether to include SSL support... $ECHO_C" >&6
8478
8479
# Check whether --with-ssl or --without-ssl was given.
8480
if test "${with_ssl+set}" = set; then
8481
  withval="$with_ssl"
8482
8483
  case "$withval" in
8484
    no)
8485
      echo "$as_me:$LINENO: result: no" >&5
8486
echo "${ECHO_T}no" >&6 ;;
8487
    yes)
8488
      echo "$as_me:$LINENO: result: yes" >&5
8489
echo "${ECHO_T}yes" >&6
8490
      echo "$as_me:$LINENO: checking for SSL_accept in -lssl" >&5
8491
echo $ECHO_N "checking for SSL_accept in -lssl... $ECHO_C" >&6
8492
if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then
8493
  echo $ECHO_N "(cached) $ECHO_C" >&6
8494
else
8495
  ac_check_lib_save_LIBS=$LIBS
8496
LIBS="-lssl -lcrypto $LIBS"
8497
cat >conftest.$ac_ext <<_ACEOF
8498
/* confdefs.h.  */
8499
_ACEOF
8500
cat confdefs.h >>conftest.$ac_ext
8501
cat >>conftest.$ac_ext <<_ACEOF
8502
/* end confdefs.h.  */
8503
8504
/* Override any gcc2 internal prototype to avoid an error.  */
8505
#ifdef __cplusplus
8506
extern "C"
8507
#endif
8508
/* We use char because int might match the return type of a gcc2
8509
   builtin and then its argument prototype would still apply.  */
8510
char SSL_accept ();
8511
int
8512
main ()
8513
{
8514
SSL_accept ();
8515
  ;
8516
  return 0;
8517
}
8518
_ACEOF
8519
rm -f conftest.$ac_objext conftest$ac_exeext
8520
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8521
  (eval $ac_link) 2>conftest.er1
8522
  ac_status=$?
8523
  grep -v '^ *+' conftest.er1 >conftest.err
8524
  rm -f conftest.er1
8525
  cat conftest.err >&5
8526
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527
  (exit $ac_status); } &&
8528
	 { ac_try='test -z "$ac_c_werror_flag"
8529
			 || test ! -s conftest.err'
8530
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8531
  (eval $ac_try) 2>&5
8532
  ac_status=$?
8533
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534
  (exit $ac_status); }; } &&
8535
	 { ac_try='test -s conftest$ac_exeext'
8536
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8537
  (eval $ac_try) 2>&5
8538
  ac_status=$?
8539
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8540
  (exit $ac_status); }; }; then
8541
  ac_cv_lib_ssl_SSL_accept=yes
8542
else
8543
  echo "$as_me: failed program was:" >&5
8544
sed 's/^/| /' conftest.$ac_ext >&5
8545
8546
ac_cv_lib_ssl_SSL_accept=no
8547
fi
8548
rm -f conftest.err conftest.$ac_objext \
8549
      conftest$ac_exeext conftest.$ac_ext
8550
LIBS=$ac_check_lib_save_LIBS
8551
fi
8552
echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_accept" >&5
8553
echo "${ECHO_T}$ac_cv_lib_ssl_SSL_accept" >&6
8554
if test $ac_cv_lib_ssl_SSL_accept = yes; then
8555
  cat >>confdefs.h <<\_ACEOF
8556
#define EGG_SSL_EXT 1
8557
_ACEOF
8558
8559
      SSL_LIBS="-lssl -lcrypto"
8560
else
8561
  { { echo "$as_me:$LINENO: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" >&5
8562
echo "$as_me: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" >&2;}
8563
   { (exit 1); exit 1; }; }
8564
fi
8565
8566
      ;;
8567
    *)
8568
      test -f $withval/openssl/ssl.h && SSL_INCLUDE="$withval"
8569
      test -f $withval/include/openssl/ssl.h && SSL_INCLUDE="$withval/include"
8570
8571
      test -f $withval/lib/libssl.a && SSL_LIB="$withval/lib"
8572
      test -f $withval/lib/ssl/libssl.a && SSL_LIB="$withval/lib/ssl"
8573
      test -f $withval/lib/openssl/libssl.a && SSL_LIB="$withval/lib/openssl/ssl"
8574
      test -f $withval/libssl.a && SSL_LIB="$withval"
8575
      test -f $withval/ssl/libssl.a && SSL_LIB="$withval/ssl"
8576
      test -f $withval/openssl/libssl.a && SSL_LIB="$withval/openssl"
8577
8578
      test -f $withval/lib/libcrypto.a && CRYPTO_LIB="$withval/lib"
8579
      test -f $withval/lib/ssl/libcrypto.a && CRYPTO_LIB="$withval/lib/ssl"
8580
      test -f $withval/lib/openssl/libcrypto.a && CRYPTO_LIB="$withval/lib/openssl/ssl"
8581
      test -f $withval/libcrypto.a && CRYPTO_LIB="$withval"
8582
      test -f $withval/ssl/libcrypto.a && CRYPTO_LIB="$withval/ssl"
8583
      test -f $withval/openssl/libcrypto.a && CRYPTO_LIB="$withval/openssl"
8584
8585
      if test -n "$SSL_INCLUDE" && test -n "$SSL_LIB" && test -n "$CRYPTO_LIB"; then
8586
        SSL_LIBS="-lssl -lcrypto -L$SSL_LIB -L$CRYPTO_LIB";
8587
        cat >>confdefs.h <<\_ACEOF
8588
#define EGG_SSL_EXT 1
8589
_ACEOF
8590
8591
        echo "$as_me:$LINENO: result: yes" >&5
8592
echo "${ECHO_T}yes" >&6
8593
      else
8594
        echo "$as_me:$LINENO: result: no" >&5
8595
echo "${ECHO_T}no" >&6
8596
        { { echo "$as_me:$LINENO: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" >&5
8597
echo "$as_me: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" >&2;}
8598
   { (exit 1); exit 1; }; }
8599
      fi ;;
8600
  esac
8601
8602
else
8603
8604
    echo "$as_me:$LINENO: result: will try to find" >&5
8605
echo "${ECHO_T}will try to find" >&6
8606
    echo "$as_me:$LINENO: checking for SSL_accept in -lssl" >&5
8607
echo $ECHO_N "checking for SSL_accept in -lssl... $ECHO_C" >&6
8608
if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then
8609
  echo $ECHO_N "(cached) $ECHO_C" >&6
8610
else
8611
  ac_check_lib_save_LIBS=$LIBS
8612
LIBS="-lssl -lcrypto $LIBS"
8613
cat >conftest.$ac_ext <<_ACEOF
8614
/* confdefs.h.  */
8615
_ACEOF
8616
cat confdefs.h >>conftest.$ac_ext
8617
cat >>conftest.$ac_ext <<_ACEOF
8618
/* end confdefs.h.  */
8619
8620
/* Override any gcc2 internal prototype to avoid an error.  */
8621
#ifdef __cplusplus
8622
extern "C"
8623
#endif
8624
/* We use char because int might match the return type of a gcc2
8625
   builtin and then its argument prototype would still apply.  */
8626
char SSL_accept ();
8627
int
8628
main ()
8629
{
8630
SSL_accept ();
8631
  ;
8632
  return 0;
8633
}
8634
_ACEOF
8635
rm -f conftest.$ac_objext conftest$ac_exeext
8636
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8637
  (eval $ac_link) 2>conftest.er1
8638
  ac_status=$?
8639
  grep -v '^ *+' conftest.er1 >conftest.err
8640
  rm -f conftest.er1
8641
  cat conftest.err >&5
8642
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8643
  (exit $ac_status); } &&
8644
	 { ac_try='test -z "$ac_c_werror_flag"
8645
			 || test ! -s conftest.err'
8646
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8647
  (eval $ac_try) 2>&5
8648
  ac_status=$?
8649
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650
  (exit $ac_status); }; } &&
8651
	 { ac_try='test -s conftest$ac_exeext'
8652
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8653
  (eval $ac_try) 2>&5
8654
  ac_status=$?
8655
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8656
  (exit $ac_status); }; }; then
8657
  ac_cv_lib_ssl_SSL_accept=yes
8658
else
8659
  echo "$as_me: failed program was:" >&5
8660
sed 's/^/| /' conftest.$ac_ext >&5
8661
8662
ac_cv_lib_ssl_SSL_accept=no
8663
fi
8664
rm -f conftest.err conftest.$ac_objext \
8665
      conftest$ac_exeext conftest.$ac_ext
8666
LIBS=$ac_check_lib_save_LIBS
8667
fi
8668
echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_accept" >&5
8669
echo "${ECHO_T}$ac_cv_lib_ssl_SSL_accept" >&6
8670
if test $ac_cv_lib_ssl_SSL_accept = yes; then
8671
  cat >>confdefs.h <<\_ACEOF
8672
#define EGG_SSL_EXT 1
8673
_ACEOF
8674
8675
     SSL_LIBS="-lssl -lcrypto"
8676
else
8677
  { { echo "$as_me:$LINENO: error: OpenSSL was not found. Please supply a pathname to OpenSSL" >&5
8678
echo "$as_me: error: OpenSSL was not found. Please supply a pathname to OpenSSL" >&2;}
8679
   { (exit 1); exit 1; }; }
8680
fi
8681
8682
8683
for ac_header in "openssl/ssl.h"
8684
do
8685
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8686
if eval "test \"\${$as_ac_Header+set}\" = set"; then
8687
  echo "$as_me:$LINENO: checking for $ac_header" >&5
8688
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8689
if eval "test \"\${$as_ac_Header+set}\" = set"; then
8690
  echo $ECHO_N "(cached) $ECHO_C" >&6
8691
fi
8692
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8693
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8694
else
8695
  # Is the header compilable?
8696
echo "$as_me:$LINENO: checking $ac_header usability" >&5
8697
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8698
cat >conftest.$ac_ext <<_ACEOF
8699
/* confdefs.h.  */
8700
_ACEOF
8701
cat confdefs.h >>conftest.$ac_ext
8702
cat >>conftest.$ac_ext <<_ACEOF
8703
/* end confdefs.h.  */
8704
$ac_includes_default
8705
#include <$ac_header>
8706
_ACEOF
8707
rm -f conftest.$ac_objext
8708
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8709
  (eval $ac_compile) 2>conftest.er1
8710
  ac_status=$?
8711
  grep -v '^ *+' conftest.er1 >conftest.err
8712
  rm -f conftest.er1
8713
  cat conftest.err >&5
8714
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8715
  (exit $ac_status); } &&
8716
	 { ac_try='test -z "$ac_c_werror_flag"
8717
			 || test ! -s conftest.err'
8718
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8719
  (eval $ac_try) 2>&5
8720
  ac_status=$?
8721
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8722
  (exit $ac_status); }; } &&
8723
	 { ac_try='test -s conftest.$ac_objext'
8724
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8725
  (eval $ac_try) 2>&5
8726
  ac_status=$?
8727
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8728
  (exit $ac_status); }; }; then
8729
  ac_header_compiler=yes
8730
else
8731
  echo "$as_me: failed program was:" >&5
8732
sed 's/^/| /' conftest.$ac_ext >&5
8733
8734
ac_header_compiler=no
8735
fi
8736
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8737
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8738
echo "${ECHO_T}$ac_header_compiler" >&6
8739
8740
# Is the header present?
8741
echo "$as_me:$LINENO: checking $ac_header presence" >&5
8742
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8743
cat >conftest.$ac_ext <<_ACEOF
8744
/* confdefs.h.  */
8745
_ACEOF
8746
cat confdefs.h >>conftest.$ac_ext
8747
cat >>conftest.$ac_ext <<_ACEOF
8748
/* end confdefs.h.  */
8749
#include <$ac_header>
8750
_ACEOF
8751
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8752
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8753
  ac_status=$?
8754
  grep -v '^ *+' conftest.er1 >conftest.err
8755
  rm -f conftest.er1
8756
  cat conftest.err >&5
8757
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8758
  (exit $ac_status); } >/dev/null; then
8759
  if test -s conftest.err; then
8760
    ac_cpp_err=$ac_c_preproc_warn_flag
8761
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8762
  else
8763
    ac_cpp_err=
8764
  fi
8765
else
8766
  ac_cpp_err=yes
8767
fi
8768
if test -z "$ac_cpp_err"; then
8769
  ac_header_preproc=yes
8770
else
8771
  echo "$as_me: failed program was:" >&5
8772
sed 's/^/| /' conftest.$ac_ext >&5
8773
8774
  ac_header_preproc=no
8775
fi
8776
rm -f conftest.err conftest.$ac_ext
8777
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8778
echo "${ECHO_T}$ac_header_preproc" >&6
8779
8780
# So?  What about this header?
8781
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8782
  yes:no: )
8783
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8784
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8785
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8786
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8787
    ac_header_preproc=yes
8788
    ;;
8789
  no:yes:* )
8790
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8791
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8792
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8793
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8794
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8795
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8796
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8797
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8798
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8799
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8800
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8801
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8802
    (
8803
      cat <<\_ASBOX
8804
## -------------------------------- ##
8805
## Report this to bugs@eggheads.org ##
8806
## -------------------------------- ##
8807
_ASBOX
8808
    ) |
8809
      sed "s/^/$as_me: WARNING:     /" >&2
8810
    ;;
8811
esac
8812
echo "$as_me:$LINENO: checking for $ac_header" >&5
8813
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8814
if eval "test \"\${$as_ac_Header+set}\" = set"; then
8815
  echo $ECHO_N "(cached) $ECHO_C" >&6
8816
else
8817
  eval "$as_ac_Header=\$ac_header_preproc"
8818
fi
8819
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8820
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8821
8822
fi
8823
if test `eval echo '${'$as_ac_Header'}'` = yes; then
8824
  cat >>confdefs.h <<_ACEOF
8825
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8826
_ACEOF
8827
8828
else
8829
  { { echo "$as_me:$LINENO: error: OpenSSL was not found. Please supply a pathname to OpenSSL" >&5
8830
echo "$as_me: error: OpenSSL was not found. Please supply a pathname to OpenSSL" >&2;}
8831
   { (exit 1); exit 1; }; }
8832
fi
8833
8834
done
8835
8836
8837
8838
fi;
8839
8840
#end of ssl checks
8841
8842
8474
8843
8475
for ac_func in vprintf
8844
for ac_func in vprintf
8476
do
8845
do
Lines 10034-10040 Link Here
10034
fi
10403
fi
10035
10404
10036
10405
10037
  if test "$egg_cv_var_tcl_threaded" = "yes"; then
10038
    if test "$enable_tcl_threads" = "no"; then
10406
    if test "$enable_tcl_threads" = "no"; then
10039
10407
10040
      cat << 'EOF' >&2
10408
      cat << 'EOF' >&2
Lines 10056-10062 Link Here
10056
    if test ! "${ac_cv_lib_pthread-x}" = "x"; then
10424
    if test ! "${ac_cv_lib_pthread-x}" = "x"; then
10057
      LIBS="$ac_cv_lib_pthread $LIBS"
10425
      LIBS="$ac_cv_lib_pthread $LIBS"
10058
    fi
10426
    fi
10059
  fi
10060
10427
10061
10428
10062
  if test "$EGG_CYGWIN" = "yes"; then
10429
  if test "$EGG_CYGWIN" = "yes"; then
Lines 10154-10160 Link Here
10154
10521
10155
10522
10156
# Create Makefiles
10523
# Create Makefiles
10157
                                                                      ac_config_files="$ac_config_files Makefile doc/Makefile scripts/Makefile src/Makefile src/compat/Makefile src/md5/Makefile src/mod/Makefile"
10524
                                                                      ac_config_files="$ac_config_files Makefile doc/Makefile scripts/Makefile src/Makefile src/compat/Makefile src/mod/Makefile"
10158
10525
10159
cat >confcache <<\_ACEOF
10526
cat >confcache <<\_ACEOF
10160
# This file is a shell script that caches the results of configure
10527
# This file is a shell script that caches the results of configure
Lines 10699-10705 Link Here
10699
  "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
11066
  "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
10700
  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
11067
  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
10701
  "src/compat/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/compat/Makefile" ;;
11068
  "src/compat/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/compat/Makefile" ;;
10702
  "src/md5/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/md5/Makefile" ;;
10703
  "src/mod/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mod/Makefile" ;;
11069
  "src/mod/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mod/Makefile" ;;
10704
  "replace-if-changed" ) CONFIG_COMMANDS="$CONFIG_COMMANDS replace-if-changed" ;;
11070
  "replace-if-changed" ) CONFIG_COMMANDS="$CONFIG_COMMANDS replace-if-changed" ;;
10705
  "catch-make-rebuild" ) CONFIG_COMMANDS="$CONFIG_COMMANDS catch-make-rebuild" ;;
11071
  "catch-make-rebuild" ) CONFIG_COMMANDS="$CONFIG_COMMANDS catch-make-rebuild" ;;
Lines 10827-10832 Link Here
10827
s,@TCLINCFN@,$TCLINCFN,;t t
11193
s,@TCLINCFN@,$TCLINCFN,;t t
10828
s,@TCL_REQS@,$TCL_REQS,;t t
11194
s,@TCL_REQS@,$TCL_REQS,;t t
10829
s,@TCL_LIBS@,$TCL_LIBS,;t t
11195
s,@TCL_LIBS@,$TCL_LIBS,;t t
11196
s,@SSL_LIBS@,$SSL_LIBS,;t t
11197
s,@SSL_INCLUDE@,$SSL_INCLUDE,;t t
10830
s,@EGGVERSION@,$EGGVERSION,;t t
11198
s,@EGGVERSION@,$EGGVERSION,;t t
10831
s,@DEST@,$DEST,;t t
11199
s,@DEST@,$DEST,;t t
10832
s,@MOD_UPDIR@,$MOD_UPDIR,;t t
11200
s,@MOD_UPDIR@,$MOD_UPDIR,;t t
(-)eggdrop1.6.19/configure.ac (-1 / +2 lines)
Lines 150-155 Link Here
150
EGG_TCL_LIB_REQS
150
EGG_TCL_LIB_REQS
151
EGG_TCL_LUSH
151
EGG_TCL_LUSH
152
152
153
EGG_SSL_CRAP
153
154
154
# Substitute Makefile variables.
155
# Substitute Makefile variables.
155
EGG_SUBST_EGGVERSION
156
EGG_SUBST_EGGVERSION
Lines 161-167 Link Here
161
162
162
163
163
# Create Makefiles
164
# Create Makefiles
164
AC_CONFIG_FILES([Makefile doc/Makefile scripts/Makefile src/Makefile src/compat/Makefile src/md5/Makefile src/mod/Makefile])
165
AC_CONFIG_FILES([Makefile doc/Makefile scripts/Makefile src/Makefile src/compat/Makefile src/mod/Makefile])
165
AC_OUTPUT
166
AC_OUTPUT
166
167
167
168
(-)eggdrop1.6.19/Makefile.in (-7 / +10 lines)
Lines 57-62 Link Here
57
RANLIB = @RANLIB@
57
RANLIB = @RANLIB@
58
MOD_EXT = @MOD_EXT@
58
MOD_EXT = @MOD_EXT@
59
XREQS = @TCL_REQS@
59
XREQS = @TCL_REQS@
60
XSSL_LIBS = @SSL_LIBS@
61
XSSL_INCLUDE = @SSL_INCLUDE@
60
TCLLIB = @TCLLIB@
62
TCLLIB = @TCLLIB@
61
TCLLIBFN = @TCLLIBFN@
63
TCLLIBFN = @TCLLIBFN@
62
64
Lines 89-95 Link Here
89
MAKE_MODEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' \
91
MAKE_MODEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' \
90
'STRIP=$(MOD_STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS)' \
92
'STRIP=$(MOD_STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS)' \
91
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
93
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
92
'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(standard build)' 'MODOBJS='
94
'XSSL_LIBS=$(XSSL_LIBS)' 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' \
95
'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'EGGBUILD=' 'MODOBJS='
93
96
94
MAKE_MODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
97
MAKE_MODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
95
'STRIP=$(SHLIB_STRIP)' 'CFLGS=$(CFLGS)' 'XLIBS=$(XLIBS)' 'MOD_EXT=$(MOD_EXT)' \
98
'STRIP=$(SHLIB_STRIP)' 'CFLGS=$(CFLGS)' 'XLIBS=$(XLIBS)' 'MOD_EXT=$(MOD_EXT)' \
Lines 99-110 Link Here
99
'STRIP=$(STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS) -DSTATIC' \
102
'STRIP=$(STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS) -DSTATIC' \
100
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
103
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
101
'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static version)' \
104
'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static version)' \
102
'MODOBJS=mod/*.o'
105
'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'XSSL_LIBS=$(XSSL_LIBS)' 'MODOBJS=mod/*.o'
103
106
104
MAKE_DEBEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD) -g' \
107
MAKE_DEBEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD) -g' \
105
'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \
108
'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \
106
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
109
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
107
'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(debug version)' 'MODOBJS='
110
'XSSL_LIBS=$(XSSL_LIBS)' 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' \
111
'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'EGGBUILD=(debug version)' 'MODOBJS='
108
112
109
MAKE_DEBMODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
113
MAKE_DEBMODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
110
'XLIBS=$(XLIBS)' 'STRIP=touch' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \
114
'XLIBS=$(XLIBS)' 'STRIP=touch' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \
Lines 113-119 Link Here
113
MAKE_SDEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD) -g' \
117
MAKE_SDEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD) -g' \
114
'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) -DSTATIC $(CFLGS)' \
118
'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) -DSTATIC $(CFLGS)' \
115
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' \
119
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' \
116
'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static debug version)' 'MODOBJS=mod/*.o'
120
'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'XSSL_LIBS=$(XSSL_LIBS)' 'EGGEXEC=$(EGGEXEC)' \
121
'EGGBUILD=(static and debug version)' 'MODOBJS=mod/*.o'
117
122
118
MAKE_DEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)'
123
MAKE_DEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)'
119
124
Lines 128-134 Link Here
128
	@cd doc && $(MAKE) clean
133
	@cd doc && $(MAKE) clean
129
	@cd scripts && $(MAKE) clean
134
	@cd scripts && $(MAKE) clean
130
	@cd src && $(MAKE) clean
135
	@cd src && $(MAKE) clean
131
	@cd src/md5 && $(MAKE) clean
132
	@cd src/compat && $(MAKE) clean
136
	@cd src/compat && $(MAKE) clean
133
137
134
clean: eggclean
138
clean: eggclean
Lines 136-142 Link Here
136
140
137
distclean: eggclean clean-modconfig
141
distclean: eggclean clean-modconfig
138
	@cd src/mod && $(MAKE) distclean
142
	@cd src/mod && $(MAKE) distclean
139
	@rm -f Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/compat/Makefile src/mod/Makefile
143
	@rm -f Makefile doc/Makefile scripts/Makefile src/Makefile src/compat/Makefile src/mod/Makefile
140
	@rm -f config.cache config.log config.status config.h lush.h
144
	@rm -f config.cache config.log config.status config.h lush.h
141
	@rm -rf autom4te.cache
145
	@rm -rf autom4te.cache
142
146
Lines 146-152 Link Here
146
depend:
150
depend:
147
	@cat /dev/null > lush.h
151
	@cat /dev/null > lush.h
148
	@cd src && $(MAKE_DEPEND) depend
152
	@cd src && $(MAKE_DEPEND) depend
149
	@cd src/md5 && $(MAKE_DEPEND) depend
150
	@cd src/mod && $(MAKE_DEPEND) depend
153
	@cd src/mod && $(MAKE_DEPEND) depend
151
	@cd src/compat && $(MAKE_DEPEND) depend
154
	@cd src/compat && $(MAKE_DEPEND) depend
152
155
(-)eggdrop1.6.19/src/dcc.c (-1 / +1 lines)
Lines 32-38 Link Here
32
#include "tandem.h"
32
#include "tandem.h"
33
33
34
/* Includes for botnet md5 challenge/response code <cybah> */
34
/* Includes for botnet md5 challenge/response code <cybah> */
35
#include "md5/md5.h"
35
#include "openssl/md5.h"
36
36
37
extern struct userrec *userlist;
37
extern struct userrec *userlist;
38
extern struct chanset_t *chanset;
38
extern struct chanset_t *chanset;
(-)eggdrop1.6.19/src/dccutil.c (+1 lines)
Lines 33-38 Link Here
33
#include "chan.h"
33
#include "chan.h"
34
#include "modules.h"
34
#include "modules.h"
35
#include "tandem.h"
35
#include "tandem.h"
36
#include "net.h"
36
37
37
extern struct dcc_t *dcc;
38
extern struct dcc_t *dcc;
38
extern int dcc_total, max_dcc, dcc_flood_thr, backgrd, copy_to_tmp, MAXSOCKS;
39
extern int dcc_total, max_dcc, dcc_flood_thr, backgrd, copy_to_tmp, MAXSOCKS;
(-)eggdrop1.6.19/src/eggdrop.h (-11 lines)
Lines 616-632 Link Here
616
#define HELP_TEXT       2
616
#define HELP_TEXT       2
617
#define HELP_IRC        16
617
#define HELP_IRC        16
618
618
619
/* This is used by the net module to keep track of sockets and what's
620
 * queued on them
621
 */
622
typedef struct {
623
  int sock;
624
  short flags;
625
  char *inbuf;
626
  char *outbuf;
627
  unsigned long outbuflen;      /* Outbuf could be binary data  */
628
  unsigned long inbuflen;       /* Inbuf could be binary data   */
629
} sock_list;
630
619
631
enum {
620
enum {
632
  EGG_OPTION_SET = 1,           /* Set option(s).               */
621
  EGG_OPTION_SET = 1,           /* Set option(s).               */
(-)eggdrop1.6.19/src/main.c (+6 lines)
Lines 161-166 Link Here
161
int cx_ptr = 0;
161
int cx_ptr = 0;
162
#endif
162
#endif
163
163
164
#ifdef EGG_SSL_EXT
165
int clean_net();
166
#endif
164
167
165
void fatal(const char *s, int recoverable)
168
void fatal(const char *s, int recoverable)
166
{
169
{
Lines 171-176 Link Here
171
  for (i = 0; i < dcc_total; i++)
174
  for (i = 0; i < dcc_total; i++)
172
    if (dcc[i].sock >= 0)
175
    if (dcc[i].sock >= 0)
173
      killsock(dcc[i].sock);
176
      killsock(dcc[i].sock);
177
  #ifdef EGG_SSL_EXT
178
  clean_net();
179
  #endif
174
  unlink(pid_file);
180
  unlink(pid_file);
175
  if (!recoverable) {
181
  if (!recoverable) {
176
    bg_send_quit(BG_ABORT);
182
    bg_send_quit(BG_ABORT);
(-)eggdrop1.6.19/src/Makefile.in (-8 / +7 lines)
Lines 11-16 Link Here
11
INSTALL_PROGRAM = @INSTALL_PROGRAM@
11
INSTALL_PROGRAM = @INSTALL_PROGRAM@
12
INSTALL_DATA = @INSTALL_DATA@
12
INSTALL_DATA = @INSTALL_DATA@
13
INSTALL_SCRIPT = @INSTALL_SCRIPT@
13
INSTALL_SCRIPT = @INSTALL_SCRIPT@
14
XSSL_LIBS = @SSL_LIBS@
15
XSSL_INCLUDE = @SSL_INCLUDE@
14
16
15
CC = @CC@
17
CC = @CC@
16
LD = @CC@
18
LD = @CC@
Lines 33-43 Link Here
33
	@echo ""
35
	@echo ""
34
	@cd .. && $(MAKE)
36
	@cd .. && $(MAKE)
35
37
36
../$(EGGEXEC): build_msg $(eggdrop_objs) $(XREQS) compile_md5 compatability
38
../$(EGGEXEC): build_msg $(eggdrop_objs) $(XREQS) compatability
37
	@echo "Linking eggdrop $(EGGBUILD)."
39
	@echo "Linking eggdrop $(EGGBUILD)."
38
	@echo ""
40
	@echo ""
39
	@touch mod/mod.xlibs
41
	@touch mod/mod.xlibs
40
	$(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) md5/md5c.o compat/*.o `cat mod/mod.xlibs`
42
	$(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) compat/*.o `cat mod/mod.xlibs` $(XSSL_LIBS) $(XSSL_INCLUDE)
41
	$(STRIP) ../$(EGGEXEC)
43
	$(STRIP) ../$(EGGEXEC)
42
	@echo ""
44
	@echo ""
43
	@echo "Successful compile: $(EGGEXEC)"
45
	@echo "Successful compile: $(EGGEXEC)"
Lines 68-76 Link Here
68
	@echo "---------- Yeah! That's the compiling, now the linking! ----------"
70
	@echo "---------- Yeah! That's the compiling, now the linking! ----------"
69
	@echo ""
71
	@echo ""
70
72
71
compile_md5:
72
	@cd md5 && $(MAKE_GENERIC) md5
73
74
libtcle.a: $(TCLLIB)/lib$(TCLLIBFN)
73
libtcle.a: $(TCLLIB)/lib$(TCLLIBFN)
75
	@echo "[ Fixing lib$(TCLLIBFN) -> libtcle.a ]"
74
	@echo "[ Fixing lib$(TCLLIBFN) -> libtcle.a ]"
76
	cp $(TCLLIB)/lib$(TCLLIBFN) libtcle.a
75
	cp $(TCLLIB)/lib$(TCLLIBFN) libtcle.a
Lines 122-128 Link Here
122
  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
121
  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
123
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
122
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
124
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
123
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
125
  modules.h mod/modvals.h tandem.h md5/md5.h
124
  modules.h mod/modvals.h tandem.h
126
dccutil.o: dccutil.c main.h ../config.h ../lush.h lang.h eggdrop.h \
125
dccutil.o: dccutil.c main.h ../config.h ../lush.h lang.h eggdrop.h \
127
  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
126
  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
128
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
127
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
Lines 169-175 Link Here
169
  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
168
  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
170
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
169
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
171
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
170
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
172
  modules.h mod/modvals.h tandem.h md5/md5.h
171
  modules.h mod/modvals.h tandem.h
173
net.o: net.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
172
net.o: net.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
174
  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
173
  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
175
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
174
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
Lines 195-201 Link Here
195
  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
194
  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
196
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
195
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
197
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
196
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
198
  modules.h mod/modvals.h tandem.h md5/md5.h
197
  modules.h mod/modvals.h tandem.h
199
tcluser.o: tcluser.c main.h ../config.h ../lush.h lang.h eggdrop.h \
198
tcluser.o: tcluser.c main.h ../config.h ../lush.h lang.h eggdrop.h \
200
  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
199
  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
201
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
200
  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
(-)eggdrop1.6.19/src/md5/Makefile.in (-51 lines)
Lines 1-51 Link Here
1
# Makefile for src/md5/
2
# $Id: Makefile.in,v 1.13 2005-12-09 09:29:11 wcc Exp $
3
4
SHELL = @SHELL@
5
top_srcdir = @top_srcdir@
6
srcdir = @srcdir@
7
VPATH = @srcdir@
8
9
@SET_MAKE@
10
INSTALL = @INSTALL@
11
INSTALL_PROGRAM = @INSTALL_PROGRAM@
12
INSTALL_DATA = @INSTALL_DATA@
13
INSTALL_SCRIPT = @INSTALL_SCRIPT@
14
15
CC = @CC@
16
LD = @CC@
17
STRIP = @STRIP@
18
CFLAGS = @CFLAGS@ -I. -I../.. -I$(top_srcdir) -I$(top_srcdir)/src @DEFS@ $(CFLGS)
19
CPPFLAGS = @CPPFLAGS@
20
21
OBJS = md5c.o
22
23
doofus:
24
	@echo ""
25
	@echo "Let's try this from the right directory..."
26
	@echo ""
27
	@cd ../.. && $(MAKE)
28
29
depend:
30
	$(CC) -I../.. -I../../src -DMAKING_DEPEND -DHAVE_CONFIG_H -MM *.c > .depend
31
32
clean:
33
	@rm -f .depend *.o *~
34
35
md5: $(OBJS)
36
37
.SUFFIXES:
38
.SUFFIXES: .c .o .h
39
40
.c.o:
41
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
42
43
#safety hash
44
md5c.o: md5c.c md5.h ../../src/compat/compat.h \
45
  ../../src/compat/inet_aton.h ../../src/main.h ../../config.h \
46
  ../../lush.h ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
47
  ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
48
  ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
49
  ../../src/users.h ../../src/compat/compat.h ../../src/compat/snprintf.h \
50
  ../../src/compat/memset.h ../../src/compat/memcpy.h \
51
  ../../src/compat/strcasecmp.h ../../src/compat/strftime.h
(-)eggdrop1.6.19/src/md5/md5c.c (-271 lines)
Lines 1-271 Link Here
1
/*
2
 * This is an OpenSSL-compatible implementation of the RSA Data Security,
3
 * Inc. MD5 Message-Digest Algorithm.
4
 *
5
 * Written by Solar Designer <solar@openwall.com> in 2001, and placed in
6
 * the public domain.
7
 *
8
 * This differs from Colin Plumb's older public domain implementation in
9
 * that no 32-bit integer data type is required, there's no compile-time
10
 * endianness configuration, and the function prototypes match OpenSSL's.
11
 * The primary goals are portability and ease of use.
12
 *
13
 * This implementation is meant to be fast, but not as fast as possible.
14
 * Some known optimizations are not included to reduce source code size
15
 * and avoid compile-time configuration.
16
 */
17
18
#include <string.h>
19
20
#include "md5.h"
21
#include "compat/compat.h"
22
23
/*
24
 * The basic MD5 functions.
25
 *
26
 * F is optimized compared to its RFC 1321 definition just like in Colin
27
 * Plumb's implementation.
28
 */
29
#define F(x, y, z)			((z) ^ ((x) & ((y) ^ (z))))
30
#define G(x, y, z)			((y) ^ ((z) & ((x) ^ (y))))
31
#define H(x, y, z)			((x) ^ (y) ^ (z))
32
#define I(x, y, z)			((y) ^ ((x) | ~(z)))
33
34
/*
35
 * The MD5 transformation for all four rounds.
36
 */
37
#define STEP(f, a, b, c, d, x, t, s) \
38
	(a) += f((b), (c), (d)) + (x) + (t); \
39
	(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
40
	(a) += (b);
41
42
/*
43
 * SET reads 4 input bytes in little-endian byte order and stores them
44
 * in a properly aligned word in host byte order.
45
 *
46
 * The check for little-endian architectures which tolerate unaligned
47
 * memory accesses is just an optimization.  Nothing will break if it
48
 * doesn't work.
49
 */
50
#if defined(__i386__) || defined(__vax__)
51
#define SET(n) \
52
	(*(MD5_u32plus *)&ptr[(n) * 4])
53
#define GET(n) \
54
	SET(n)
55
#else
56
#define SET(n) \
57
	(ctx->block[(n)] = \
58
	(MD5_u32plus)ptr[(n) * 4] | \
59
	((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
60
	((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
61
	((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
62
#define GET(n) \
63
	(ctx->block[(n)])
64
#endif
65
66
/*
67
 * This processes one or more 64-byte data blocks, but does NOT update
68
 * the bit counters.  There're no alignment requirements.
69
 */
70
static void *body(MD5_CTX *ctx, void *data, unsigned long size)
71
{
72
	unsigned char *ptr;
73
	MD5_u32plus a, b, c, d;
74
	MD5_u32plus saved_a, saved_b, saved_c, saved_d;
75
76
	ptr = data;
77
78
	a = ctx->a;
79
	b = ctx->b;
80
	c = ctx->c;
81
	d = ctx->d;
82
83
	do {
84
		saved_a = a;
85
		saved_b = b;
86
		saved_c = c;
87
		saved_d = d;
88
89
/* Round 1 */
90
		STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
91
		STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
92
		STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
93
		STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
94
		STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
95
		STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
96
		STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
97
		STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
98
		STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
99
		STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
100
		STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
101
		STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
102
		STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
103
		STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
104
		STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
105
		STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
106
107
/* Round 2 */
108
		STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
109
		STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
110
		STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
111
		STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
112
		STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
113
		STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
114
		STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
115
		STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
116
		STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
117
		STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
118
		STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
119
		STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
120
		STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
121
		STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
122
		STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
123
		STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
124
125
/* Round 3 */
126
		STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
127
		STEP(H, d, a, b, c, GET(8), 0x8771f681, 11)
128
		STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
129
		STEP(H, b, c, d, a, GET(14), 0xfde5380c, 23)
130
		STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
131
		STEP(H, d, a, b, c, GET(4), 0x4bdecfa9, 11)
132
		STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
133
		STEP(H, b, c, d, a, GET(10), 0xbebfbc70, 23)
134
		STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
135
		STEP(H, d, a, b, c, GET(0), 0xeaa127fa, 11)
136
		STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
137
		STEP(H, b, c, d, a, GET(6), 0x04881d05, 23)
138
		STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
139
		STEP(H, d, a, b, c, GET(12), 0xe6db99e5, 11)
140
		STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
141
		STEP(H, b, c, d, a, GET(2), 0xc4ac5665, 23)
142
143
/* Round 4 */
144
		STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
145
		STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
146
		STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
147
		STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
148
		STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
149
		STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
150
		STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
151
		STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
152
		STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
153
		STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
154
		STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
155
		STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
156
		STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
157
		STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
158
		STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
159
		STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)
160
161
		a += saved_a;
162
		b += saved_b;
163
		c += saved_c;
164
		d += saved_d;
165
166
		ptr += 64;
167
	} while (size -= 64);
168
169
	ctx->a = a;
170
	ctx->b = b;
171
	ctx->c = c;
172
	ctx->d = d;
173
174
	return ptr;
175
}
176
177
void MD5_Init(MD5_CTX *ctx)
178
{
179
	ctx->a = 0x67452301;
180
	ctx->b = 0xefcdab89;
181
	ctx->c = 0x98badcfe;
182
	ctx->d = 0x10325476;
183
184
	ctx->lo = 0;
185
	ctx->hi = 0;
186
}
187
188
void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size)
189
{
190
	MD5_u32plus saved_lo;
191
	unsigned long used, free;
192
193
	saved_lo = ctx->lo;
194
	if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
195
		ctx->hi++;
196
	ctx->hi += size >> 29;
197
198
	used = saved_lo & 0x3f;
199
200
	if (used) {
201
		free = 64 - used;
202
203
		if (size < free) {
204
			egg_memcpy(&ctx->buffer[used], data, size);
205
			return;
206
		}
207
208
		egg_memcpy(&ctx->buffer[used], data, free);
209
		data = ((unsigned char *)data) + free;
210
		size -= free;
211
		body(ctx, ctx->buffer, 64);
212
	}
213
214
	if (size >= 64) {
215
		data = body(ctx, data, size & ~(unsigned long)0x3f);
216
		size &= 0x3f;
217
	}
218
219
	egg_memcpy(ctx->buffer, data, size);
220
}
221
222
void MD5_Final(unsigned char *result, MD5_CTX *ctx)
223
{
224
	unsigned long used, free;
225
226
	used = ctx->lo & 0x3f;
227
228
	ctx->buffer[used++] = 0x80;
229
230
	free = 64 - used;
231
232
	if (free < 8) {
233
		egg_memset(&ctx->buffer[used], 0, free);
234
		body(ctx, ctx->buffer, 64);
235
		used = 0;
236
		free = 64;
237
	}
238
239
	egg_memset(&ctx->buffer[used], 0, free - 8);
240
241
	ctx->lo <<= 3;
242
	ctx->buffer[56] = ctx->lo;
243
	ctx->buffer[57] = ctx->lo >> 8;
244
	ctx->buffer[58] = ctx->lo >> 16;
245
	ctx->buffer[59] = ctx->lo >> 24;
246
	ctx->buffer[60] = ctx->hi;
247
	ctx->buffer[61] = ctx->hi >> 8;
248
	ctx->buffer[62] = ctx->hi >> 16;
249
	ctx->buffer[63] = ctx->hi >> 24;
250
251
	body(ctx, ctx->buffer, 64);
252
253
	result[0] = ctx->a;
254
	result[1] = ctx->a >> 8;
255
	result[2] = ctx->a >> 16;
256
	result[3] = ctx->a >> 24;
257
	result[4] = ctx->b;
258
	result[5] = ctx->b >> 8;
259
	result[6] = ctx->b >> 16;
260
	result[7] = ctx->b >> 24;
261
	result[8] = ctx->c;
262
	result[9] = ctx->c >> 8;
263
	result[10] = ctx->c >> 16;
264
	result[11] = ctx->c >> 24;
265
	result[12] = ctx->d;
266
	result[13] = ctx->d >> 8;
267
	result[14] = ctx->d >> 16;
268
	result[15] = ctx->d >> 24;
269
270
	egg_memset(ctx, 0, sizeof(ctx));
271
}
(-)eggdrop1.6.19/src/md5/md5.h (-26 lines)
Lines 1-26 Link Here
1
/*
2
 * This is an OpenSSL-compatible implementation of the RSA Data Security,
3
 * Inc. MD5 Message-Digest Algorithm.
4
 *
5
 * Written by Solar Designer <solar@openwall.com> in 2001, and placed in
6
 * the public domain.  See md5c.c for more information.
7
 */
8
9
#ifndef _MD5_H
10
#define _MD5_H
11
12
/* Any 32-bit or wider integer data type will do */
13
typedef unsigned long MD5_u32plus;
14
15
typedef struct {
16
	MD5_u32plus lo, hi;
17
	MD5_u32plus a, b, c, d;
18
	unsigned char buffer[64];
19
	MD5_u32plus block[16];
20
} MD5_CTX;
21
22
extern void MD5_Init(MD5_CTX *ctx);
23
extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
24
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
25
26
#endif
(-)eggdrop1.6.19/src/mod/compress.mod/compress.c (+2 lines)
Lines 36-41 Link Here
36
#include "src/mod/module.h"
36
#include "src/mod/module.h"
37
#include "share.mod/share.h"
37
#include "share.mod/share.h"
38
38
39
#include <zlib.h>
40
39
#ifdef HAVE_MMAP
41
#ifdef HAVE_MMAP
40
#  undef panic
42
#  undef panic
41
#  include <sys/types.h>
43
#  include <sys/types.h>
(-)eggdrop1.6.19/src/mod/irc.mod/chan.c (-2 / +2 lines)
Lines 965-974 Link Here
965
        q = strchr(p, ' ');
965
        q = strchr(p, ' ');
966
        if (q != NULL) {
966
        if (q != NULL) {
967
          *q = 0;
967
          *q = 0;
968
          set_key(chan, p);
968
          set_keyegg(chan, p);
969
          strcpy(p, q + 1);
969
          strcpy(p, q + 1);
970
        } else {
970
        } else {
971
          set_key(chan, p);
971
          set_keyegg(chan, p);
972
          *p = 0;
972
          *p = 0;
973
        }
973
        }
974
      }
974
      }
(-)eggdrop1.6.19/src/mod/irc.mod/irc.c (-1 / +1 lines)
Lines 256-262 Link Here
256
256
257
/* Set the key.
257
/* Set the key.
258
 */
258
 */
259
static void set_key(struct chanset_t *chan, char *k)
259
static void set_keyegg(struct chanset_t *chan, char *k)
260
{
260
{
261
  nfree(chan->channel.key);
261
  nfree(chan->channel.key);
262
  if (k == NULL) {
262
  if (k == NULL) {
(-)eggdrop1.6.19/src/mod/irc.mod/irc.h (-1 / +1 lines)
Lines 69-75 Link Here
69
69
70
static void reset_chan_info(struct chanset_t *);
70
static void reset_chan_info(struct chanset_t *);
71
static void recheck_channel(struct chanset_t *, int);
71
static void recheck_channel(struct chanset_t *, int);
72
static void set_key(struct chanset_t *, char *);
72
static void set_keyegg(struct chanset_t *, char *);
73
static void maybe_revenge(struct chanset_t *, char *, char *, int);
73
static void maybe_revenge(struct chanset_t *, char *, char *, int);
74
static int detect_chan_flood(char *, char *, char *, struct chanset_t *, int,
74
static int detect_chan_flood(char *, char *, char *, struct chanset_t *, int,
75
                             char *);
75
                             char *);
(-)eggdrop1.6.19/src/mod/irc.mod/mode.c (-2 / +2 lines)
Lines 1128-1134 Link Here
1128
            break;
1128
            break;
1129
          }
1129
          }
1130
          if (ms2[0] == '+') {
1130
          if (ms2[0] == '+') {
1131
            set_key(chan, op);
1131
            set_keyegg(chan, op);
1132
            if (channel_active(chan))
1132
            if (channel_active(chan))
1133
              got_key(chan, nick, from, op);
1133
              got_key(chan, nick, from, op);
1134
          } else {
1134
          } else {
Lines 1139-1145 Link Here
1139
                       !chan_master(user) && !match_my_nick(nick))
1139
                       !chan_master(user) && !match_my_nick(nick))
1140
                add_mode(chan, '+', 'k', chan->key_prot);
1140
                add_mode(chan, '+', 'k', chan->key_prot);
1141
            }
1141
            }
1142
            set_key(chan, NULL);
1142
            set_keyegg(chan, NULL);
1143
          }
1143
          }
1144
          check_tcl_mode(nick, from, u, chan->dname, ms2, op);
1144
          check_tcl_mode(nick, from, u, chan->dname, ms2, op);
1145
          break;
1145
          break;
(-)eggdrop1.6.19/src/mod/module.h (-1 / +11 lines)
Lines 471-483 Link Here
471
/* IPv6 leftovers: 286 */
471
/* IPv6 leftovers: 286 */
472
/* IPv6 leftovers: 287 */
472
/* IPv6 leftovers: 287 */
473
/* 288 - 291 */
473
/* 288 - 291 */
474
/* IPv6 leftovers: 288 */
474
#ifdef EGG_SSL_EXT
475
#define net_switch_to_ssl ((int (*)(int))global[289])
476
#define ssl_use (*(int *)global[290]) /* kyotou */
477
#define strip_mirc_codes ((void (*)(int, char *))global[291])
478
#define check_ansi ((int (*) (char *))global[292])
479
#define oatoi ((int (*) (const char *))global[293])
480
/* 292 - 295 */
481
#define str_isdigit ((int (*) (const char *))global[294])
482
#define remove_crlf ((void (*)(char **))global[295])
483
#else
475
#define strip_mirc_codes ((void (*)(int, char *))global[289])
484
#define strip_mirc_codes ((void (*)(int, char *))global[289])
476
#define check_ansi ((int (*) (char *))global[290])
485
#define check_ansi ((int (*) (char *))global[290])
477
#define oatoi ((int (*) (const char *))global[291])
486
#define oatoi ((int (*) (const char *))global[291])
478
/* 292 - 295 */
487
/* 292 - 295 */
479
#define str_isdigit ((int (*) (const char *))global[292])
488
#define str_isdigit ((int (*) (const char *))global[292])
480
#define remove_crlf ((void (*)(char **))global[293])
489
#define remove_crlf ((void (*)(char **))global[293])
490
#endif
481
491
482
/* hostmasking */
492
/* hostmasking */
483
#define maskhost(a,b) _maskhost((a),(b),1)
493
#define maskhost(a,b) _maskhost((a),(b),1)
(-)eggdrop1.6.19/src/mod/server.mod/servmsg.c (+8 lines)
Lines 1293-1298 Link Here
1293
      fatal("NO SERVERS WILL ACCEPT MY CONNECTION.", 0);
1293
      fatal("NO SERVERS WILL ACCEPT MY CONNECTION.", 0);
1294
  } else {
1294
  } else {
1295
    dcc[servidx].sock = serv;
1295
    dcc[servidx].sock = serv;
1296
	#ifdef EGG_SSL_EXT
1297
	if (ssl_use) { /* kyotou */
1298
		if (net_switch_to_ssl(serv)==0) {
1299
			putlog(LOG_SERV, "*", "SSL %s %s (Error while switching to SSL)", IRC_FAILEDCONNECT, dcc[servidx].host);
1300
			lostdcc(servidx);    
1301
		}
1302
	}    
1303
	#endif
1296
    /* Queue standard login */
1304
    /* Queue standard login */
1297
    dcc[servidx].timeval = now;
1305
    dcc[servidx].timeval = now;
1298
    SERVER_SOCKET.timeout_val = &server_timeout;
1306
    SERVER_SOCKET.timeout_val = &server_timeout;
(-)eggdrop1.6.19/src/modules.c (-1 / +19 lines)
Lines 29-37 Link Here
29
#include "main.h"
29
#include "main.h"
30
#include "modules.h"
30
#include "modules.h"
31
#include "tandem.h"
31
#include "tandem.h"
32
#include "md5/md5.h"
32
33
#include "openssl/md5.h"
34
33
#include "users.h"
35
#include "users.h"
34
36
37
#include "net.h"
38
35
#ifndef STATIC
39
#ifndef STATIC
36
#  ifdef MOD_USE_SHL
40
#  ifdef MOD_USE_SHL
37
#    include <dl.h>
41
#    include <dl.h>
Lines 94-99 Link Here
94
           password_timeout, force_expire, protect_readonly, reserved_port_min,
98
           password_timeout, force_expire, protect_readonly, reserved_port_min,
95
           reserved_port_max, copy_to_tmp, quiet_reject;
99
           reserved_port_max, copy_to_tmp, quiet_reject;
96
100
101
#ifdef EGG_SSL_EXT
102
extern int      ssl_use; /* kyotou */
103
#endif
104
97
extern party_t *party;
105
extern party_t *party;
98
extern time_t now, online_since;
106
extern time_t now, online_since;
99
extern tand_t *tandbot;
107
extern tand_t *tandbot;
Lines 128-133 Link Here
128
}
136
}
129
#endif /* STATIC */
137
#endif /* STATIC */
130
138
139
#ifdef EGG_SSL_EXT
140
int net_switch_to_ssl(int);
141
#endif
142
131
143
132
/* The null functions */
144
/* The null functions */
133
void null_func()
145
void null_func()
Lines 564-570 Link Here
564
  (Function) 0,                   /* IPv6 leftovers: 286                 */
576
  (Function) 0,                   /* IPv6 leftovers: 286                 */
565
  (Function) 0,                   /* IPv6 leftovers: 287                 */
577
  (Function) 0,                   /* IPv6 leftovers: 287                 */
566
  /* 288 - 291 */
578
  /* 288 - 291 */
579
#ifdef EGG_SSL_EXT
567
  (Function) 0,                   /* IPv6 leftovers: 288                 */
580
  (Function) 0,                   /* IPv6 leftovers: 288                 */
581
  (Function) net_switch_to_ssl,
582
  (Function) & ssl_use, /* kyotou */
583
#else
584
  (Function) 0,                   /* IPv6 leftovers: 288                 */
585
#endif
568
  (Function) strip_mirc_codes,
586
  (Function) strip_mirc_codes,
569
  (Function) check_ansi,
587
  (Function) check_ansi,
570
  (Function) oatoi,
588
  (Function) oatoi,
(-)eggdrop1.6.19/src/net.c (-1 / +215 lines)
Lines 52-57 Link Here
52
#  endif
52
#  endif
53
#endif
53
#endif
54
54
55
#ifdef EGG_SSL_EXT
56
#  ifndef EGG_SSL_INCS
57
#    include <openssl/ssl.h>
58
#    include <openssl/err.h>
59
#    include <openssl/rand.h>
60
#    define EGG_SSL_INCS 1
61
#  endif
62
#endif
63
64
#include "net.h"
65
66
55
extern struct dcc_t *dcc;
67
extern struct dcc_t *dcc;
56
extern int backgrd, use_stderr, resolve_timeout, dcc_total;
68
extern int backgrd, use_stderr, resolve_timeout, dcc_total;
57
extern unsigned long otraffic_irc_today, otraffic_bn_today, otraffic_dcc_today,
69
extern unsigned long otraffic_irc_today, otraffic_bn_today, otraffic_dcc_today,
Lines 64-70 Link Here
64
int firewallport = 1080;      /* Default port of socks 4/5 firewalls.         */
76
int firewallport = 1080;      /* Default port of socks 4/5 firewalls.         */
65
char botuser[21] = "eggdrop"; /* Username of the user running the bot.        */
77
char botuser[21] = "eggdrop"; /* Username of the user running the bot.        */
66
int dcc_sanitycheck = 0;      /* Do some sanity checking on dcc connections.  */
78
int dcc_sanitycheck = 0;      /* Do some sanity checking on dcc connections.  */
67
79
#ifdef EGG_SSL_EXT
80
SSL_CTX *ssl_ctx=NULL;
81
char	*tls_rand_file = NULL;
82
int     ssl_use = 0; /* kyotou */
83
#endif
68
sock_list *socklist = NULL;   /* Enough to be safe.                           */
84
sock_list *socklist = NULL;   /* Enough to be safe.                           */
69
int MAXSOCKS = 0;
85
int MAXSOCKS = 0;
70
sigjmp_buf alarmret;             /* Env buffer for alarm() returns.              */
86
sigjmp_buf alarmret;             /* Env buffer for alarm() returns.              */
Lines 88-93 Link Here
88
  return ret;
104
  return ret;
89
}
105
}
90
106
107
#ifdef EGG_SSL_EXT
108
int seed_PRNG(void)
109
{
110
    char stackdata[1024];
111
    static char rand_file[300];
112
    FILE *fh;
113
    
114
#if OPENSSL_VERSION_NUMBER >= 0x00905100
115
    if (RAND_status())
116
	return 0;     /* PRNG already good seeded */
117
#endif
118
    /* if the device '/dev/urandom' is present, OpenSSL uses it by default.
119
     * check if it's present, else we have to make random data ourselfs.
120
     */
121
    if ((fh = fopen("/dev/urandom", "r"))) {
122
	fclose(fh);
123
	return 0;
124
    }
125
    if (RAND_file_name(rand_file, sizeof(rand_file)))
126
	tls_rand_file = rand_file;
127
    else
128
	return 1;
129
    if (!RAND_load_file(rand_file, 1024)) {
130
	/* no .rnd file found, create new seed */
131
	unsigned int c;
132
	c = time(NULL);
133
	RAND_seed(&c, sizeof(c));
134
	c = getpid();
135
	RAND_seed(&c, sizeof(c));
136
	RAND_seed(stackdata, sizeof(stackdata));
137
    }
138
#if OPENSSL_VERSION_NUMBER >= 0x00905100
139
    if (!RAND_status())
140
	return 2;   /* PRNG still badly seeded */
141
#endif
142
    return 0;
143
}
144
#endif
145
146
91
/* Initialize the socklist
147
/* Initialize the socklist
92
 */
148
 */
93
void init_net()
149
void init_net()
Lines 96-103 Link Here
96
152
97
  for (i = 0; i < MAXSOCKS; i++) {
153
  for (i = 0; i < MAXSOCKS; i++) {
98
    socklist[i].flags = SOCK_UNUSED;
154
    socklist[i].flags = SOCK_UNUSED;
155
#ifdef EGG_SSL_EXT
156
    socklist[i].ssl=NULL;
157
#endif
99
  }
158
  }
159
#ifdef EGG_SSL_EXT
160
  /* good place to init ssl stuff */
161
  SSL_load_error_strings();
162
  OpenSSL_add_ssl_algorithms();
163
  ssl_ctx=SSL_CTX_new(SSLv23_client_method());
164
  if (!ssl_ctx) 
165
  fatal("SSL_CTX_new() failed",0);
166
  if (seed_PRNG())
167
    fatal("Wasn't able to properly seed the PRNG!",0);	
168
#endif
169
}
170
171
#ifdef EGG_SSL_EXT
172
/* cleanup mess when quiting */
173
int clean_net() {
174
   if (ssl_ctx) {
175
	SSL_CTX_free(ssl_ctx);
176
	ssl_ctx = NULL;
177
  }
178
  if (tls_rand_file)
179
	RAND_write_file(tls_rand_file);
180
 return 0;
100
}
181
}
182
#endif
101
183
102
int expmem_net()
184
int expmem_net()
103
{
185
{
Lines 307-312 Link Here
307
389
308
  for (i = 0; i < MAXSOCKS; i++) {
390
  for (i = 0; i < MAXSOCKS; i++) {
309
    if ((socklist[i].sock == sock) && !(socklist[i].flags & SOCK_UNUSED)) {
391
    if ((socklist[i].sock == sock) && !(socklist[i].flags & SOCK_UNUSED)) {
392
#ifdef EGG_SSL_EXT
393
      if (socklist[i].ssl) {
394
    	SSL_shutdown(socklist[i].ssl);
395
	    SSL_free(socklist[i].ssl);
396
	    socklist[i].ssl=NULL;
397
      }
398
#endif
310
      close(socklist[i].sock);
399
      close(socklist[i].sock);
311
      if (socklist[i].inbuf != NULL) {
400
      if (socklist[i].inbuf != NULL) {
312
        nfree(socklist[i].inbuf);
401
        nfree(socklist[i].inbuf);
Lines 448-453 Link Here
448
  return sock;
537
  return sock;
449
}
538
}
450
539
540
#ifdef EGG_SSL_EXT
541
int net_switch_to_ssl(int sock) {
542
int err;
543
int i=0;
544
    debug0("net_switch_to_ssl()");
545
    while (i<MAXSOCKS) {
546
     if (socklist[i].sock==sock) {
547
      break;
548
     }
549
     i++;
550
    }
551
    if (i==MAXSOCKS) {
552
        debug0("Error while swithing to SSL - sock not found in list");
553
	return 0;
554
    }
555
556
    if (socklist[i].ssl) {
557
        debug0("Error while swithing to SSL - already in ssl");
558
	return 0;
559
    }
560
    socklist[i].ssl = SSL_new(ssl_ctx);
561
    if (!socklist[i].ssl) {
562
        debug0("Error while swithing to SSL - SSL_new() error");
563
	return 0;
564
    }
565
566
     SSL_set_fd(socklist[i].ssl, socklist[i].sock);
567
     err = SSL_connect(socklist[i].ssl);
568
   
569
     while (err <= 0) {
570
        int errs;
571
        errs=SSL_get_error(socklist[i].ssl,err);
572
        if ((errs!=SSL_ERROR_WANT_READ)&&(errs!=SSL_ERROR_WANT_WRITE)&&
573
	        (errs!=SSL_ERROR_WANT_X509_LOOKUP)) {
574
		putlog(LOG_DEBUG,"*", "SSL_connect() = %d, %s", err,
575
			(char *)ERR_error_string(ERR_get_error(), NULL));
576
	 	SSL_shutdown(socklist[i].ssl);
577
	 	SSL_free(socklist[i].ssl);
578
	 	socklist[i].ssl = NULL;
579
	        return 0;	    
580
        }
581
        usleep(1000);
582
        err = SSL_connect(socklist[i].ssl);
583
     }
584
585
     if (err==1) {
586
      debug0("SSL_connect() success"); 
587
      return 1;
588
     }
589
     debug0("Error while SSL_connect()"); 
590
     SSL_shutdown(socklist[i].ssl);
591
     SSL_free(socklist[i].ssl); 
592
     socklist[i].ssl = NULL;
593
     return 0;
594
}
595
#endif
596
451
/* Ordinary non-binary connection attempt */
597
/* Ordinary non-binary connection attempt */
452
int open_telnet(char *server, int port)
598
int open_telnet(char *server, int port)
453
{
599
{
Lines 627-632 Link Here
627
    for (i = 0; i < MAXSOCKS; i++) {
773
    for (i = 0; i < MAXSOCKS; i++) {
628
      if ((!(socklist[i].flags & SOCK_UNUSED)) &&
774
      if ((!(socklist[i].flags & SOCK_UNUSED)) &&
629
          ((FD_ISSET(socklist[i].sock, &fd)) ||
775
          ((FD_ISSET(socklist[i].sock, &fd)) ||
776
#ifdef EGG_SSL_EXT
777
		  ((socklist[i].ssl)&&(SSL_pending(socklist[i].ssl))) ||
778
#endif	  
630
          ((socklist[i].sock == STDOUT) && (!backgrd) &&
779
          ((socklist[i].sock == STDOUT) && (!backgrd) &&
631
          (FD_ISSET(STDIN, &fd))))) {
780
          (FD_ISSET(STDIN, &fd))))) {
632
        if (socklist[i].flags & (SOCK_LISTEN | SOCK_CONNECT)) {
781
        if (socklist[i].flags & (SOCK_LISTEN | SOCK_CONNECT)) {
Lines 651-657 Link Here
651
        if ((socklist[i].sock == STDOUT) && !backgrd)
800
        if ((socklist[i].sock == STDOUT) && !backgrd)
652
          x = read(STDIN, s, grab);
801
          x = read(STDIN, s, grab);
653
        else
802
        else
803
#ifdef EGG_SSL_EXT
804
	{
805
        if (socklist[i].ssl) {
806
           x=SSL_read(socklist[i].ssl,s,grab);
807
 	   if (x < 0) {
808
	    int err = SSL_get_error(socklist[i].ssl, x);
809
	    x = -1;
810
	    switch (err) {
811
	    	case SSL_ERROR_WANT_READ:
812
		    errno = EAGAIN;
813
		    break;
814
	    	case SSL_ERROR_WANT_WRITE:
815
 		    errno = EAGAIN;
816
		    break;
817
         	case SSL_ERROR_WANT_X509_LOOKUP:
818
		    errno = EAGAIN;
819
		    break;
820
		}
821
  	    }
822
        } else
654
          x = read(socklist[i].sock, s, grab);
823
          x = read(socklist[i].sock, s, grab);
824
	}
825
#else
826
	  x = read(socklist[i].sock, s, grab);
827
#endif  
655
        if (x <= 0) {           /* eof */
828
        if (x <= 0) {           /* eof */
656
          if (errno != EAGAIN) { /* EAGAIN happens when the operation would
829
          if (errno != EAGAIN) { /* EAGAIN happens when the operation would
657
                                  * block on a non-blocking socket, if the
830
                                  * block on a non-blocking socket, if the
Lines 944-949 Link Here
944
        socklist[i].outbuflen += len;
1117
        socklist[i].outbuflen += len;
945
        return;
1118
        return;
946
      }
1119
      }
1120
#ifdef EGG_SSL_EXT
1121
      if (socklist[i].ssl) {
1122
       x=SSL_write(socklist[i].ssl,s,len);
1123
 	   if (x < 0) {
1124
	    int err = SSL_get_error(socklist[i].ssl, x);
1125
	    x = -1;
1126
	    switch (err) {
1127
	    	case SSL_ERROR_WANT_READ:
1128
			errno = EAGAIN;
1129
		    break;
1130
        	case SSL_ERROR_WANT_WRITE:
1131
		    errno = EAGAIN;
1132
		    break;
1133
        	case SSL_ERROR_WANT_X509_LOOKUP:
1134
		    errno = EAGAIN;
1135
		    break;
1136
		}
1137
  	   }
1138
      } else
1139
#endif      
947
      /* Try. */
1140
      /* Try. */
948
      x = write(z, s, len);
1141
      x = write(z, s, len);
949
      if (x == -1)
1142
      if (x == -1)
Lines 1010-1015 Link Here
1010
        (socklist[i].outbuf != NULL) && (FD_ISSET(socklist[i].sock, &wfds))) {
1203
        (socklist[i].outbuf != NULL) && (FD_ISSET(socklist[i].sock, &wfds))) {
1011
      /* Trick tputs into doing the work */
1204
      /* Trick tputs into doing the work */
1012
      errno = 0;
1205
      errno = 0;
1206
#ifdef EGG_SSL_EXT
1207
      if (socklist[i].ssl) {
1208
	   x = write(socklist[i].sock, socklist[i].outbuf,
1209
		socklist[i].outbuflen);
1210
 	   if (x < 0) {
1211
 	    int err = SSL_get_error(socklist[i].ssl, x);
1212
 	    x = -1;
1213
 	    switch (err) {
1214
 	    	case SSL_ERROR_WANT_READ:
1215
 		    errno = EAGAIN;
1216
 		    break;
1217
 	    	case SSL_ERROR_WANT_WRITE:
1218
 		    errno = EAGAIN;
1219
 		    break;
1220
 	    	case SSL_ERROR_WANT_X509_LOOKUP:
1221
 		    errno = EAGAIN;
1222
 		    break;
1223
 		}
1224
   	    }
1225
       } else
1226
#endif   
1013
      x = write(socklist[i].sock, socklist[i].outbuf, socklist[i].outbuflen);
1227
      x = write(socklist[i].sock, socklist[i].outbuf, socklist[i].outbuflen);
1014
      if ((x < 0) && (errno != EAGAIN)
1228
      if ((x < 0) && (errno != EAGAIN)
1015
#ifdef EBADSLT
1229
#ifdef EBADSLT
(-)eggdrop1.6.19/src/net.h (+30 lines)
Line 0 Link Here
1
#ifndef _EGG_NET_H
2
#define _EGG_NET_H
3
#ifdef EGG_SSL_EXT
4
# ifndef EGG_SSL_INCS
5
#  include <openssl/ssl.h>
6
#  include <openssl/err.h>
7
#  include <openssl/rand.h>
8
#  define EGG_SSL_INCS 1
9
# endif
10
#endif
11
12
/* This is used by the net module to keep track of sockets and what's
13
 * queued on them
14
 */
15
typedef struct {
16
  int		 sock;
17
#ifdef EGG_SSL_EXT
18
  SSL *ssl;  
19
#endif
20
  short		 flags;
21
  char		*inbuf;
22
  char		*outbuf;
23
  unsigned long  outbuflen;	/* Outbuf could be binary data	*/
24
  unsigned long	 inbuflen;	/* Inbuf could be binary data	*/
25
#ifdef USE_IPV6
26
  unsigned int af;
27
#endif /* USE_IPV6 */
28
} sock_list;
29
30
#endif				/* _EGG_NET_H */
(-)eggdrop1.6.19/src/patch.h (-5 / +3 lines)
Lines 32-42 Link Here
32
 */
32
 */
33
#ifndef _EGG_PATCH_H
33
#ifndef _EGG_PATCH_H
34
#define _EGG_PATCH_H
34
#define _EGG_PATCH_H
35
/*
35
#ifdef EGG_SSL_EXT
36
 *
36
patch("SSL");
37
 *
37
#endif
38
 */
39
/* PATCH GOES HERE */
40
/*
38
/*
41
 *
39
 *
42
 *
40
 *
(-)eggdrop1.6.19/src/tcl.c (+6 lines)
Lines 44-49 Link Here
44
44
45
45
46
extern time_t online_since;
46
extern time_t online_since;
47
#ifdef EGG_SSL_EXT
48
extern int      ssl_use; /* kyotou */
49
#endif
47
50
48
extern char origbotname[], botuser[], motdfile[], admin[], userfile[],
51
extern char origbotname[], botuser[], motdfile[], admin[], userfile[],
49
            firewall[], helpdir[], notify_new[], hostname[], myip[], moddir[],
52
            firewall[], helpdir[], notify_new[], hostname[], myip[], moddir[],
Lines 522-527 Link Here
522
  {"enable-simul",          &enable_simul,         0}, /* compat */
525
  {"enable-simul",          &enable_simul,         0}, /* compat */
523
  {"debug-output",          &debug_output,         0}, /* compat */
526
  {"debug-output",          &debug_output,         0}, /* compat */
524
  {"use-console-r",         &use_console_r,        0}, /* compat */
527
  {"use-console-r",         &use_console_r,        0}, /* compat */
528
#ifdef EGG_SSL_EXT
529
  {"use-ssl",			&ssl_use,		0}, /* kyotou */
530
#endif
525
  {NULL,                    NULL,                  0}
531
  {NULL,                    NULL,                  0}
526
};
532
};
527
533
(-)eggdrop1.6.19/src/tclmisc.c (-1 / +2 lines)
Lines 26-32 Link Here
26
#include "main.h"
26
#include "main.h"
27
#include "modules.h"
27
#include "modules.h"
28
#include "tandem.h"
28
#include "tandem.h"
29
#include "md5/md5.h"
29
30
#include "openssl/md5.h"
30
31
31
#ifdef TIME_WITH_SYS_TIME
32
#ifdef TIME_WITH_SYS_TIME
32
#  include <sys/time.h>
33
#  include <sys/time.h>

Return to bug 222483