Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
*/
#undef HAVE_DIRENT_H

/* Define to 1 if you have the `dladdr' function. */
#undef HAVE_DLADDR

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

Expand Down
8 changes: 7 additions & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac b63b615.
# From configure.ac webui.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for Eggdrop 1.10.1.
#
Expand Down Expand Up @@ -8279,6 +8279,12 @@ if test "x$ac_cv_func_clock_gettime" = xyes
then :
printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
if test "x$ac_cv_func_dladdr" = xyes
then :
printf "%s\n" "#define HAVE_DLADDR 1" >>confdefs.h

fi
ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf"
if test "x$ac_cv_func_dprintf" = xyes
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ AX_TYPE_SOCKLEN_T
AX_CREATE_STDINT_H([eggint.h])

# Checks for functions and their arguments.
AC_CHECK_FUNCS([clock_gettime dprintf explicit_bzero memset_explicit explicit_memset getrandom inet_aton memset_s snprintf strlcpy vsnprintf])
AC_CHECK_FUNCS([clock_gettime dladdr dprintf explicit_bzero memset_explicit explicit_memset getrandom inet_aton memset_s snprintf strlcpy vsnprintf])
AC_FUNC_SELECT_ARGTYPES
EGG_FUNC_B64_NTOP
AC_FUNC_MMAP
Expand Down
17 changes: 12 additions & 5 deletions src/chanprog.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,22 @@ void tell_verbose_status(int idx)
if (tcl_threaded())
dprintf(idx, "Tcl is threaded.\n");
#ifdef TLS
dprintf(idx, "TLS support is enabled.\n"
dprintf(idx, "TLS support is enabled.\n");
#ifdef HAVE_DLADDR
#include <dlfcn.h>
#include <openssl/ssl.h>
Dl_info info;
if (dladdr((void *) SSL_CTX_new, &info))
dprintf(idx, "TLS library: %s\n", info.dli_fname);
#endif
#if defined HAVE_EVP_PKEY_GET1_EC_KEY && defined HAVE_OPENSSL_MD5
"TLS library: %s (%s " OPENSSL_VERSION_TEXT ")\n",
dprintf(idx, "TLS version: %s (%s " OPENSSL_VERSION_TEXT ")\n",
#elif !defined HAVE_EVP_PKEY_GET1_EC_KEY && defined HAVE_OPENSSL_MD5
"TLS library: %s (%s " OPENSSL_VERSION_TEXT ")\n (no elliptic curve support)\n",
dprintf(idx, "TLS version: %s (%s " OPENSSL_VERSION_TEXT ")\n (no elliptic curve support)\n",
#elif defined HAVE_EVP_PKEY_GET1_EC_KEY && !defined HAVE_OPENSSL_MD5
"TLS library: %s (%s " OPENSSL_VERSION_TEXT ")\n (no MD5 support)\n",
dprintf(idx, "TLS version: %s (%s " OPENSSL_VERSION_TEXT ")\n (no MD5 support)\n",
#elif !defined HAVE_EVP_PKEY_GET1_EC_KEY && !defined HAVE_OPENSSL_MD5
"TLS library: %s (%s " OPENSSL_VERSION_TEXT ")\n (no elliptic curve or MD5 support)\n",
dprintf(idx, "TLS version: %s (%s " OPENSSL_VERSION_TEXT ")\n (no elliptic curve or MD5 support)\n",
#endif
#if OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 */
OpenSSL_version(OPENSSL_VERSION), MISC_HEADERVERSION);
Expand Down
Loading