From 04c748481e42b7a06f2fa13fc9a9c51d77bc7821 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Thu, 21 Jan 2016 15:17:55 +0100 Subject: [PATCH] Remove OpenSSL conditionals --- configure.ac | 2 -- pdns/Makefile.am | 52 +++++++++++++--------------------- pdns/pdnsutil.cc | 7 +---- pdns/receiver.cc | 4 --- pdns/recursordist/Makefile.am | 15 ++++------ pdns/recursordist/configure.ac | 2 -- pdns/version.cc | 2 -- 7 files changed, 25 insertions(+), 59 deletions(-) diff --git a/configure.ac b/configure.ac index b835602cb..cd8e87308 100644 --- a/configure.ac +++ b/configure.ac @@ -108,8 +108,6 @@ PDNS_ENABLE_BOTAN PDNS_WITH_CRYPTOPP PDNS_CHECK_LIBSODIUM AX_CHECK_OPENSSL([ - AM_CONDITIONAL([OPENSSL], [true]) - AC_DEFINE(HAVE_OPENSSL, [1], [Define to 1 if you openssl]) ],[ AC_MSG_ERROR([OpenSSL not found]) ] diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 2f85205b8..93cb28226 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -166,6 +166,7 @@ pdns_server_SOURCES = \ nameserver.cc nameserver.hh \ namespaces.hh \ nsecrecords.cc \ + opensslsigners.cc opensslsigners.hh \ packetcache.cc packetcache.hh \ packethandler.cc packethandler.hh \ pdnsexception.hh \ @@ -197,14 +198,16 @@ pdns_server_SOURCES = \ pdns_server_LDFLAGS = \ $(AM_LDFLAGS) \ - $(DYNLINKFLAGS) + $(DYNLINKFLAGS) \ + $(OPENSSL_LDFLAGS) pdns_server_LDADD = \ @moduleobjects@ \ @modulelibs@ \ $(LIBDL) \ $(YAHTTP_LIBS) \ - $(JSON11_LIBS) + $(JSON11_LIBS) \ + $(OPENSSL_LIBS) if BOTAN110 pdns_server_SOURCES += botan110signers.cc botansigners.cc @@ -216,12 +219,6 @@ pdns_server_SOURCES += sodiumsigners.cc pdns_server_LDADD += $(LIBSODIUM_LIBS) endif -if OPENSSL -pdns_server_SOURCES += opensslsigners.cc opensslsigners.hh -pdns_server_LDFLAGS += $(OPENSSL_LDFLAGS) -pdns_server_LDADD += $(OPENSSL_LIBS) -endif - if SQLITE3 pdns_server_SOURCES += ssqlite3.cc ssqlite3.hh pdns_server_LDADD += $(SQLITE3_LIBS) @@ -273,6 +270,7 @@ pdnsutil_SOURCES = \ logger.cc \ misc.cc misc.hh \ nsecrecords.cc \ + opensslsigners.cc opensslsigners.hh \ packetcache.cc \ pdnsutil.cc \ qtype.cc \ @@ -290,7 +288,8 @@ pdnsutil_SOURCES = \ pdnsutil_LDFLAGS = \ $(AM_LDFLAGS) \ $(DYNLINKFLAGS) \ - $(BOOST_PROGRAM_OPTIONS_LDFLAGS) + $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \ + $(OPENSSL_LDFLAGS) pdnsutil_LDADD = \ @moduleobjects@ \ @@ -298,7 +297,8 @@ pdnsutil_LDADD = \ $(LIBDL) \ $(BOOST_PROGRAM_OPTIONS_LIBS) \ $(YAHTTP_LIBS) \ - $(JSON11_LIBS) + $(JSON11_LIBS) \ + $(OPENSSL_LIBS) if BOTAN110 pdnsutil_SOURCES += botan110signers.cc botansigners.cc @@ -310,12 +310,6 @@ pdnsutil_SOURCES += sodiumsigners.cc pdnsutil_LDADD += $(LIBSODIUM_LIBS) endif -if OPENSSL -pdnsutil_SOURCES += opensslsigners.cc opensslsigners.hh -pdnsutil_LDFLAGS += $(OPENSSL_LDFLAGS) -pdnsutil_LDADD += $(OPENSSL_LIBS) -endif - if SQLITE3 pdnsutil_SOURCES += ssqlite3.cc ssqlite3.hh pdnsutil_LDADD += $(SQLITE3_LIBS) @@ -643,6 +637,7 @@ toysdig_SOURCES = \ logger.cc \ misc.cc misc.hh \ nsecrecords.cc \ + opensslsigners.cc opensslsigners.hh \ qtype.cc \ randomhelper.cc \ rcpgenerator.cc rcpgenerator.hh \ @@ -654,8 +649,9 @@ toysdig_SOURCES = \ validate.cc validate.hh -toysdig_LDFLAGS = $(AM_LDFLAGS) -toysdig_LDADD = +toysdig_LDFLAGS = $(AM_LDFLAGS) \ + $(OPENSSL_LDFLAGS) +toysdig_LDADD = $(OPENSSL_LIBS) if GSS_TSIG toysdig_LDADD += $(GSS_LIBS) @@ -671,13 +667,6 @@ toysdig_SOURCES += pkcs11signers.cc pkcs11signers.hh toysdig_LDADD += $(P11KIT1_LIBS) endif -if OPENSSL -toysdig_SOURCES += opensslsigners.cc opensslsigners.hh -toysdig_LDADD += $(OPENSSL_LIBS) -toysdig_LDFLAGS += $(OPENSSL_LDFLAGS) -endif - - tsig_tests_SOURCES = \ arguments.cc \ base32.cc \ @@ -1095,6 +1084,7 @@ pdns_recursor_SOURCES = \ pdns_recursor.cc \ pubsuffix.cc \ qtype.cc \ + opensslsigners.cc opensslsigners.hh \ randomhelper.cc \ rcpgenerator.cc rcpgenerator.hh \ rec-carbon.cc \ @@ -1125,9 +1115,11 @@ pdns_recursor_SOURCES = \ pdns_recursor_LDADD = \ $(YAHTTP_LIBS) \ - $(JSON11_LIBS) + $(JSON11_LIBS) \ + $(OPENSSL_LIBS) -pdns_recursor_LDFLAGS = $(AM_LDFLAGS) +pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \ + $(OPENSSL_LDFLAGS) if PKCS11 pdns_recursor_SOURCES += pkcs11signers.cc pkcs11signers.hh @@ -1139,12 +1131,6 @@ pdns_recursor_SOURCES += botan110signers.cc botansigners.cc pdns_recursor_LDADD += $(BOTAN110_LIBS) endif -if OPENSSL -pdns_recursor_SOURCES += opensslsigners.cc opensslsigners.hh -pdns_recursor_LDADD += $(OPENSSL_LIBS) -pdns_recursor_LDFLAGS += $(OPENSSL_LDFLAGS) -endif - if MALLOC_TRACE pdns_recursor_SOURCES += malloctrace.cc malloctrace.hh pdns_recursor_LDFLAGS += -rdynamic diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 7a2e25ca7..6c02e6bcf 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -19,13 +19,10 @@ #include "dns_random.hh" #include #include //termios, TCSANOW, ECHO, ICANON - +#include "opensslsigners.hh" #ifdef HAVE_LIBSODIUM #include #endif -#ifdef HAVE_OPENSSL -#include "opensslsigners.hh" -#endif #ifdef HAVE_SQLITE3 #include "ssqlite3.hh" #include "bind-dnssec.schema.sqlite3.sql.h" @@ -1900,9 +1897,7 @@ seedRandom(::arg()["entropy-source"]); } #endif -#ifdef HAVE_OPENSSL openssl_seed(); -#endif if (cmds[0] == "test-algorithm") { if(cmds.size() != 2) { diff --git a/pdns/receiver.cc b/pdns/receiver.cc index 594dfaf9a..e98f3d82a 100644 --- a/pdns/receiver.cc +++ b/pdns/receiver.cc @@ -49,9 +49,7 @@ #ifdef HAVE_LIBSODIUM #include #endif -#ifdef HAVE_OPENSSL #include "opensslsigners.hh" -#endif #include "dns.hh" #include "dnsbackend.hh" @@ -509,10 +507,8 @@ int main(int argc, char **argv) } #endif -#ifdef HAVE_OPENSSL openssl_thread_setup(); openssl_seed(); -#endif loadModules(); BackendMakers().launch(::arg()["launch"]); // vrooooom! diff --git a/pdns/recursordist/Makefile.am b/pdns/recursordist/Makefile.am index a66086332..a02591c2d 100644 --- a/pdns/recursordist/Makefile.am +++ b/pdns/recursordist/Makefile.am @@ -79,6 +79,7 @@ pdns_recursor_SOURCES = \ mtasker.hh \ namespaces.hh \ nsecrecords.cc \ + opensslsigners.cc opensslsigners.hh \ pdns_recursor.cc \ pdnsexception.hh \ pubsuffix.hh pubsuffix.cc \ @@ -116,17 +117,11 @@ pdns_recursor_SOURCES = \ pdns_recursor_LDADD = \ $(YAHTTP_LIBS) \ - $(JSON11_LIBS) + $(JSON11_LIBS) \ + $(OPENSSL_LIBS) -pdns_recursor_LDFLAGS = $(AM_LDFLAGS) - -if OPENSSL -pdns_recursor_SOURCES += \ - opensslsigners.cc \ - opensslsigners.hh -pdns_recursor_LDADD += $(OPENSSL_LIBS) -pdns_recursor_LDFLAGS += $(OPENSSL_LDFLAGS) -endif +pdns_recursor_LDFLAGS = $(AM_LDFLAGS) \ + $(OPENSSL_LDFLAGS) if BOTAN110 pdns_recursor_SOURCES += \ diff --git a/pdns/recursordist/configure.ac b/pdns/recursordist/configure.ac index 55a639ff6..7d620e71e 100644 --- a/pdns/recursordist/configure.ac +++ b/pdns/recursordist/configure.ac @@ -46,8 +46,6 @@ PDNS_ENABLE_VERBOSE_LOGGING # Crypto libraries PDNS_ENABLE_BOTAN AX_CHECK_OPENSSL([ - AM_CONDITIONAL([OPENSSL], [true]) - AC_DEFINE(HAVE_OPENSSL, [1], [Define to 1 if you openssl]) ],[ AC_MSG_ERROR([OpenSSL not found]) ]) diff --git a/pdns/version.cc b/pdns/version.cc index 2475ddd5d..06a7bee36 100644 --- a/pdns/version.cc +++ b/pdns/version.cc @@ -90,9 +90,7 @@ void showBuildConfiguration() #ifdef HAVE_LIBSODIUM "sodium " << #endif -#ifdef HAVE_OPENSSL "openssl " << -#endif #ifdef HAVE_LIBDL "libdl " << #endif -- 2.40.0