aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
-rw-r--r--include/m_info.h8
-rw-r--r--include/s_conf.h2
-rw-r--r--include/s_newconf.h4
-rw-r--r--ircd/newconf.c8
-rw-r--r--ircd/s_newconf.c4
-rw-r--r--ircd/s_serv.c2
-rw-r--r--modules/m_challenge.c6
8 files changed, 21 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index 9b4359c6..d86eff8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -262,9 +262,11 @@ if test "$cf_enable_openssl" != no; then
dnl Work around pmake/gmake conditional incompatibilities
AC_SUBST(ENCSPEED, encspeed)
- dnl Do all the HAVE_LIBCRYPTO magic -- and check for ciphers
+ dnl Check the library is linkable
CPPFLAGS="$CPPFLAGS $SSL_LIBS"
- AC_CHECK_LIB(crypto, RSA_free)
+ AC_CHECK_LIB([crypto], [RSA_free], [
+ AC_DEFINE([HAVE_OPENSSL], [1], [Define if OpenSSL appears usable])
+ ])
SSL_LIBS="$SSL_LIBS -lcrypto"
SSL_SRCS_ENABLE='$(SSL_SRCS)'
else
diff --git a/include/m_info.h b/include/m_info.h
index 98eeafbb..384a5cbf 100644
--- a/include/m_info.h
+++ b/include/m_info.h
@@ -110,11 +110,11 @@ Info MyInformation[] = {
{"OPER_SPAM_COUNTDOWN", "", OPER_SPAM_COUNTDOWN,
"Anti SpamBot Parameter"},
-#ifdef HAVE_LIBCRYPTO
- {"HAVE_LIBCRYPTO", "ON", 0, "Enable OpenSSL CHALLENGE Support"},
+#ifdef HAVE_OPENSSL
+ {"HAVE_OPENSSL", "ON", 0, "Enable OpenSSL CHALLENGE Support"},
#else
- {"HAVE_LIBCRYPTO", "OFF", 0, "Enable OpenSSL CHALLENGE Support"},
-#endif /* HAVE_LIBCRYPTO */
+ {"HAVE_OPENSSL", "OFF", 0, "Enable OpenSSL CHALLENGE Support"},
+#endif /* HAVE_OPENSSL */
#ifdef HAVE_LIBZ
{"HAVE_LIBZ", "YES", 0, "zlib (ziplinks) support"},
diff --git a/include/s_conf.h b/include/s_conf.h
index a0c3eca4..065622cf 100644
--- a/include/s_conf.h
+++ b/include/s_conf.h
@@ -26,7 +26,7 @@
#define INCLUDED_s_conf_h
#include "setup.h"
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
#include <openssl/rsa.h>
#endif
diff --git a/include/s_newconf.h b/include/s_newconf.h
index 1e80faf8..ed210f4a 100644
--- a/include/s_newconf.h
+++ b/include/s_newconf.h
@@ -36,7 +36,7 @@
#include "setup.h"
#include "privilege.h"
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
#include <openssl/rsa.h>
#endif
@@ -119,7 +119,7 @@ struct oper_conf
struct PrivilegeSet *privset;
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
char *rsa_pubkey_file;
#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
EVP_PKEY *rsa_pubkey;
diff --git a/ircd/newconf.c b/ircd/newconf.c
index 56793b45..1d41bd5a 100644
--- a/ircd/newconf.c
+++ b/ircd/newconf.c
@@ -3,7 +3,7 @@
#include "stdinc.h"
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
@@ -586,7 +586,7 @@ conf_end_oper(struct TopConf *tc)
return 0;
}
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
if(EmptyString(yy_oper->passwd) && EmptyString(yy_oper->rsa_pubkey_file))
#else
if(EmptyString(yy_oper->passwd))
@@ -620,7 +620,7 @@ conf_end_oper(struct TopConf *tc)
yy_tmpoper->snomask = yy_oper->snomask;
yy_tmpoper->privset = yy_oper->privset;
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
if(yy_oper->rsa_pubkey_file)
{
BIO *file;
@@ -750,7 +750,7 @@ conf_set_oper_password(void *data)
static void
conf_set_oper_rsa_public_key_file(void *data)
{
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
rb_free(yy_oper->rsa_pubkey_file);
yy_oper->rsa_pubkey_file = rb_strdup((char *) data);
#else
diff --git a/ircd/s_newconf.c b/ircd/s_newconf.c
index 60bd317d..0709ded7 100644
--- a/ircd/s_newconf.c
+++ b/ircd/s_newconf.c
@@ -32,7 +32,7 @@
#include "stdinc.h"
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
#include <openssl/evp.h>
#include <openssl/rsa.h>
#endif
@@ -237,7 +237,7 @@ free_oper_conf(struct oper_conf *oper_p)
rb_free(oper_p->passwd);
}
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
rb_free(oper_p->rsa_pubkey_file);
if(oper_p->rsa_pubkey)
diff --git a/ircd/s_serv.c b/ircd/s_serv.c
index 99c08efc..365f3aca 100644
--- a/ircd/s_serv.c
+++ b/ircd/s_serv.c
@@ -24,7 +24,7 @@
#include "stdinc.h"
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
#include <openssl/rsa.h>
#endif
diff --git a/modules/m_challenge.c b/modules/m_challenge.c
index 6ea23e94..76cccb44 100644
--- a/modules/m_challenge.c
+++ b/modules/m_challenge.c
@@ -24,7 +24,7 @@
#include "stdinc.h"
-#ifdef HAVE_LIBCRYPTO
+#ifdef HAVE_OPENSSL
# include <openssl/err.h>
# include <openssl/evp.h>
# include <openssl/pem.h>
@@ -50,7 +50,7 @@
#define CHALLENGE_EXPIRES 180 /* 180 seconds should be more than long enough */
#define CHALLENGE_SECRET_LENGTH 128 /* how long our challenge secret should be */
-#ifndef HAVE_LIBCRYPTO
+#ifndef HAVE_OPENSSL
static const char challenge_desc[] = "Does nothing as OpenSSL was not enabled.";
@@ -386,4 +386,4 @@ done:
return retval;
}
-#endif /* HAVE_LIBCRYPTO */
+#endif /* HAVE_OPENSSL */