]> granicus.if.org Git - pdns/commitdiff
Remove OpenSSL conditionals
authorPieter Lexis <pieter.lexis@powerdns.com>
Thu, 21 Jan 2016 14:17:55 +0000 (15:17 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 5 Feb 2016 14:35:40 +0000 (15:35 +0100)
configure.ac
pdns/Makefile.am
pdns/pdnsutil.cc
pdns/receiver.cc
pdns/recursordist/Makefile.am
pdns/recursordist/configure.ac
pdns/version.cc

index b835602cb50e1ed47835b26ff1078b4ff482f40d..cd8e87308dbd8c62ed49bf385013a540c082ab3b 100644 (file)
@@ -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])
   ]
index 2f85205b8864731f259920def6ea07ba62121d6d..93cb28226d64032e1096a114434284f6adfcd9d9 100644 (file)
@@ -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
index 7a2e25ca79f9e252b54de8f3cdf9b11d3d428845..6c02e6bcf37d7022b6b8cd3487b4e39b5702d161 100644 (file)
 #include "dns_random.hh"
 #include <fstream>
 #include <termios.h>            //termios, TCSANOW, ECHO, ICANON
-
+#include "opensslsigners.hh"
 #ifdef HAVE_LIBSODIUM
 #include <sodium.h>
 #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) {
index 594dfaf9a62c9f3baf6cc06721096b1e8b4e7f14..e98f3d82a9f428e2c068d48f4d053ff5912eaa94 100644 (file)
@@ -49,9 +49,7 @@
 #ifdef HAVE_LIBSODIUM
 #include <sodium.h>
 #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!
index a660863323f0737ca1b933cfbbfa120649acd77d..a02591c2d90ca745b2585b7fb3c388e4fccc9926 100644 (file)
@@ -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 += \
index 55a639ff6f39be33887e67934338120364afab62..7d620e71e4391c10209163fbd99b3be477f4f277 100644 (file)
@@ -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])
 ])
index 2475ddd5ddcd563fa265813126a02fe9c8c7fa84..06a7bee36997d3a01ec2067e84ec514492954166 100644 (file)
@@ -90,9 +90,7 @@ void showBuildConfiguration()
 #ifdef HAVE_LIBSODIUM
     "sodium " <<
 #endif
-#ifdef HAVE_OPENSSL
     "openssl " <<
-#endif
 #ifdef HAVE_LIBDL
     "libdl " <<
 #endif