#include "recpacketcache.hh"
#include "utility.hh"
#include "dns_random.hh"
+#ifdef HAVE_LIBSODIUM
+#include <sodium.h>
+#endif
#include "opensslsigners.hh"
#include <iostream>
#include <errno.h>
g_maxMThreads = ::arg().asNum("max-mthreads");
checkOrFixFDS();
+#ifdef HAVE_LIBSODIUM
+ if (sodium_init() == -1) {
+ L<<Logger::Error<<"Unable to initialize sodium crypto library"<<endl;
+ exit(99);
+ }
+#endif
+
openssl_thread_setup();
openssl_seed();
pdns_recursor_LDADD += $(BOTAN110_LIBS)
endif
+if LIBSODIUM
+pdns_recursor_SOURCES += \
+ sodiumsigners.cc
+pdns_recursor_LDADD += $(LIBSODIUM_LIBS)
+endif
+
if MALLOC_TRACE
pdns_recursor_SOURCES += \
malloctrace.cc \
]
)
PDNS_CHECK_LIBCRYPTO_ECDSA
+PDNS_CHECK_LIBSODIUM
# check for tools we might need
PDNS_CHECK_RAGEL
--- /dev/null
+../../../m4/pdns_check_libsodium.m4
\ No newline at end of file
--- /dev/null
+../sodiumsigners.cc
\ No newline at end of file