Skip to content

Commit

Permalink
hook up ed25519 signer in the recursor
Browse files Browse the repository at this point in the history
(cherry picked from commit d1b2847)
  • Loading branch information
mind04 authored and pieterlexis committed May 9, 2017
1 parent abfe671 commit 7abbb2c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pdns/pdns_recursor.cc
Expand Up @@ -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>
Expand Down Expand Up @@ -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();

Expand Down
6 changes: 6 additions & 0 deletions pdns/recursordist/Makefile.am
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions pdns/recursordist/configure.ac
Expand Up @@ -113,6 +113,7 @@ PDNS_CHECK_LIBCRYPTO([
]
)
PDNS_CHECK_LIBCRYPTO_ECDSA
PDNS_CHECK_LIBSODIUM

# check for tools we might need
PDNS_CHECK_RAGEL
Expand Down
1 change: 1 addition & 0 deletions pdns/recursordist/m4/pdns_check_libsodium.m4
1 change: 1 addition & 0 deletions pdns/recursordist/sodiumsigners.cc

0 comments on commit 7abbb2c

Please sign in to comment.