Permalink
Browse files

hook up ed25519 signer in the recursor

(cherry picked from commit d1b2847)
  • Loading branch information...
mind04 authored and pieterlexis committed Jan 10, 2017
1 parent abfe671 commit 7abbb2c9f094cb5f62bc279fef56dc9d99797ff2
View
@@ -33,6 +33,9 @@
#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>
@@ -2777,6 +2780,13 @@ int serviceMain(int argc, char*argv[])
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();
@@ -230,6 +230,12 @@ pdns_recursor_SOURCES += \
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 \
@@ -113,6 +113,7 @@ PDNS_CHECK_LIBCRYPTO([
]
)
PDNS_CHECK_LIBCRYPTO_ECDSA
+PDNS_CHECK_LIBSODIUM
# check for tools we might need
PDNS_CHECK_RAGEL

0 comments on commit 7abbb2c

Please sign in to comment.