Commit 586809ac authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3036] Initialize Botan library using cryptolink.

parent a8dfa35d
......@@ -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
......
......@@ -15,6 +15,7 @@
#include <dhcp_ddns/ncr_msg.h>
#include <asiolink/io_address.h>
#include <asiolink/io_error.h>
#include <cryptolink/cryptolink.h>
#include <botan/sha2_32.h>
......@@ -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<Botan::byte> secure;
try {
Botan::SHA_256 sha;
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment