From: Marcin Siodelski Date: Tue, 20 Aug 2013 03:57:30 +0000 (+0200) Subject: [3036] Initialize Botan library using cryptolink. X-Git-Tag: bind10-1.2.0beta1-release~257^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=586809ac7369b85efe135f62b6281e141d88bfdb;p=thirdparty%2Fkea.git [3036] Initialize Botan library using cryptolink. --- diff --git a/src/lib/dhcp_ddns/Makefile.am b/src/lib/dhcp_ddns/Makefile.am index 0e1990ec23..9dcd0383d2 100644 --- a/src/lib/dhcp_ddns/Makefile.am +++ b/src/lib/dhcp_ddns/Makefile.am @@ -39,6 +39,7 @@ libb10_dhcp_ddns_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES) libb10_dhcp_ddns_la_LDFLAGS = $(AM_LDFLAGS) libb10_dhcp_ddns_la_LDFLAGS += ${BOTAN_LDFLAGS} libb10_dhcp_ddns_la_LIBADD = +libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/cryptolink/libb10-cryptolink.la libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/log/libb10-log.la libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/util/libb10-util.la diff --git a/src/lib/dhcp_ddns/ncr_msg.cc b/src/lib/dhcp_ddns/ncr_msg.cc index 8832579719..3c7a18ecea 100644 --- a/src/lib/dhcp_ddns/ncr_msg.cc +++ b/src/lib/dhcp_ddns/ncr_msg.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -86,6 +87,11 @@ D2Dhcid::fromDUID(const isc::dhcp::DUID& duid, data.insert(data.end(), wire_fqdn.begin(), wire_fqdn.end()); // Use the DUID and FQDN to compute the digest (see RFC4701, section 3). + + // The getCryptoLink is a common function to initialize the Botan library. + cryptolink::CryptoLink::getCryptoLink(); + // @todo The code below, which calculates the SHA-256 may need to be moved + // to the cryptolink library. Botan::SecureVector secure; try { Botan::SHA_256 sha; diff --git a/src/lib/dhcp_ddns/tests/Makefile.am b/src/lib/dhcp_ddns/tests/Makefile.am index 1a03833c9d..78effc7769 100644 --- a/src/lib/dhcp_ddns/tests/Makefile.am +++ b/src/lib/dhcp_ddns/tests/Makefile.am @@ -27,13 +27,8 @@ if HAVE_GTEST TESTS += libdhcp_ddns_unittests libdhcp_ddns_unittests_SOURCES = run_unittests.cc -libdhcp_ddns_unittests_SOURCES += ../dhcp_ddns_log.cc ../dhcp_ddns_log.h -libdhcp_ddns_unittests_SOURCES += ../ncr_io.cc ../ncr_io.h -libdhcp_ddns_unittests_SOURCES += ../ncr_msg.cc ../ncr_msg.h -libdhcp_ddns_unittests_SOURCES += ../ncr_udp.cc ../ncr_udp.h libdhcp_ddns_unittests_SOURCES += ncr_unittests.cc libdhcp_ddns_unittests_SOURCES += ncr_udp_unittests.cc -nodist_libdhcp_ddns_unittests_SOURCES = ../dhcp_ddns_messages.h ../dhcp_ddns_messages.cc libdhcp_ddns_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES) @@ -50,7 +45,9 @@ endif libdhcp_ddns_unittests_LDADD = $(top_builddir)/src/lib/log/libb10-log.la libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/util/libb10-util.la libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la +libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/cryptolink/libb10-cryptolink.la libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la +libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libb10-dhcp_ddns.la libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/config/libb10-cfgclient.la libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/cc/libb10-cc.la