Remove unused patches

This commit is contained in:
Petr Menšík 2022-02-21 12:42:48 +01:00
parent ad1c46614e
commit d0e91f75a2
7 changed files with 0 additions and 853 deletions

View File

@ -1,53 +0,0 @@
diff --git a/bin/named-sdb/Makefile.in b/bin/named-sdb/Makefile.in
index 1894830..445182a 100644
--- a/bin/named-sdb/Makefile.in
+++ b/bin/named-sdb/Makefile.in
@@ -34,10 +34,10 @@ top_srcdir = @top_srcdir@
#
# Add database drivers here.
#
-DBDRIVER_OBJS = ldapdb.@O@ pgsqldb.@O@ dirdb.@O@
-DBDRIVER_SRCS = ldapdb.c pgsqldb.c dirdb.c
+DBDRIVER_OBJS = ldapdb.@O@ pgsqldb.@O@ sqlitedb.@O@ dirdb.@O@
+DBDRIVER_SRCS = ldapdb.c pgsqldb.c sqlitedb.c dirdb.c
DBDRIVER_INCLUDES =
-DBDRIVER_LIBS = -lldap -llber -lpq
+DBDRIVER_LIBS = -lldap -llber -lsqlite3 -lpq
DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
diff --git a/bin/sdb_tools/Makefile.in b/bin/sdb_tools/Makefile.in
index 7f3c5e2..b1bca66 100644
--- a/bin/sdb_tools/Makefile.in
+++ b/bin/sdb_tools/Makefile.in
@@ -32,11 +32,11 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
-TARGETS = zone2ldap@EXEEXT@ zonetodb@EXEEXT@
+TARGETS = zone2ldap@EXEEXT@ zonetodb@EXEEXT@ zone2sqlite@EXEEXT@
-OBJS = zone2ldap.@O@ zonetodb.@O@
+OBJS = zone2ldap.@O@ zonetodb.@O@ zone2sqlite.@O@
-SRCS = zone2ldap.c zonetodb.c
+SRCS = zone2ldap.c zonetodb.c zone2sqlite.c
MANPAGES = zone2ldap.1
@@ -50,6 +50,9 @@ zone2ldap@EXEEXT@: zone2ldap.@O@ ${DEPLIBS}
zonetodb@EXEEXT@: zonetodb.@O@ ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ zonetodb.@O@ -lpq ${LIBS}
+zone2sqlite@EXEEXT@: zone2sqlite.@O@ ${DEPLIBS}
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ zone2sqlite.@O@ -lsqlite3 -lssl ${LIBS}
+
clean distclean manclean maintainer-clean::
rm -f ${TARGETS} ${OBJS}
@@ -60,4 +63,5 @@ installdirs:
install:: ${TARGETS} installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2ldap@EXEEXT@ ${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zonetodb@EXEEXT@ ${DESTDIR}${sbindir}
+ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2sqlite@EXEEXT@ ${DESTDIR}${sbindir}
${INSTALL_DATA} ${srcdir}/zone2ldap.1 ${DESTDIR}${mandir}/man1/zone2ldap.1

View File

@ -1,18 +0,0 @@
diff --git a/bin/sdb_tools/zone2ldap.c b/bin/sdb_tools/zone2ldap.c
index d56bc56..99c3314 100644
--- a/bin/sdb_tools/zone2ldap.c
+++ b/bin/sdb_tools/zone2ldap.c
@@ -817,11 +817,11 @@ build_dn_from_dc_list (char **dc_list, unsigned int ttl, int flag, char *zone)
}
- strlcat (dn, tmp, sizeof (dn));
+ strncat (dn, tmp, sizeof (dn) - strlen (dn));
}
sprintf (tmp, "dc=%s", dc_list[0]);
- strlcat (dn, tmp, sizeof (dn));
+ strncat (dn, tmp, sizeof (dn) - strlen (dn));
fflush(NULL);
return dn;

View File

@ -1,65 +0,0 @@
From 2b0dce163a119f5f62eb4428b485f7575f321d6f Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Mon, 5 Aug 2019 11:54:03 +0200
Subject: [PATCH] Allow explicit disabling of autodisabled MD5
Default security policy might include explicitly disabled RSAMD5
algorithm. Current FIPS code automatically disables in FIPS mode. But if
RSAMD5 is included in security policy, it fails to start, because that
algorithm is not recognized. Allow it disabled, but fail on any
other usage.
---
bin/named/server.c | 4 ++--
lib/bind9/check.c | 4 ++++
lib/dns/rcode.c | 1 +
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/bin/named/server.c b/bin/named/server.c
index ee23f10..22a5c01 100644
--- a/bin/named/server.c
+++ b/bin/named/server.c
@@ -1689,12 +1689,12 @@ disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
r.length = strlen(r.base);
result = dns_secalg_fromtext(&alg, &r);
- if (result != ISC_R_SUCCESS) {
+ if (result != ISC_R_SUCCESS && result != ISC_R_DISABLED) {
uint8_t ui;
result = isc_parse_uint8(&ui, r.base, 10);
alg = ui;
}
- if (result != ISC_R_SUCCESS) {
+ if (result != ISC_R_SUCCESS && result != ISC_R_DISABLED) {
cfg_obj_log(cfg_listelt_value(element), named_g_lctx,
ISC_LOG_ERROR, "invalid algorithm");
CHECK(result);
diff --git a/lib/bind9/check.c b/lib/bind9/check.c
index f49a346..dbf9ddb 100644
--- a/lib/bind9/check.c
+++ b/lib/bind9/check.c
@@ -317,6 +317,10 @@ disabled_algorithms(const cfg_obj_t *disabled, isc_log_t *logctx) {
r.length = strlen(r.base);
tresult = dns_secalg_fromtext(&alg, &r);
+ if (tresult == ISC_R_DISABLED) {
+ // Recognize disabled algorithms, disable it explicitly
+ tresult = ISC_R_SUCCESS;
+ }
if (tresult != ISC_R_SUCCESS) {
cfg_obj_log(cfg_listelt_value(element), logctx,
ISC_LOG_ERROR, "invalid algorithm '%s'",
diff --git a/lib/dns/rcode.c b/lib/dns/rcode.c
index 327248e..78adf63 100644
--- a/lib/dns/rcode.c
+++ b/lib/dns/rcode.c
@@ -152,6 +152,7 @@ static struct tbl rcodes[] = { RCODENAMES ERCODENAMES };
static struct tbl tsigrcodes[] = { RCODENAMES TSIGRCODENAMES };
static struct tbl certs[] = { CERTNAMES };
static struct tbl secalgs[] = { SECALGNAMES };
+static struct tbl md5_secalgs[] = { MD5_SECALGNAMES };
static struct tbl secprotos[] = { SECPROTONAMES };
static struct tbl hashalgs[] = { HASHALGNAMES };
static struct tbl dsdigests[] = { DSDIGESTNAMES };
--
2.21.1

View File

@ -1,86 +0,0 @@
From fdfc8ad6a1069eea6b012972c972798003d58312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Tue, 29 Jan 2019 18:07:44 +0100
Subject: [PATCH] Fallback to ASCII on output IDN conversion error
It is possible dig used ACE encoded name in locale, which does not
support converting it to unicode. Instead of fatal error, fallback to
ACE name on output.
(cherry picked from commit 7f4cb8f9584597fea16de6557124ac8b1bd47440)
Modify idna test to fallback to ACE
Test valid A-label on input would be displayed as A-label on output if
locale does not allow U-label.
(cherry picked from commit 4ce232f8605bdbe0594ebe5a71383c9d4e6f263b)
Emit warning on IDN output failure
Warning is emitted before any dig headers.
(cherry picked from commit 4b410038c531fbb902cd5fb83174eed1f06cb7d7)
---
bin/dig/dighost.c | 15 +++++++++++++--
bin/tests/system/idna/tests.sh | 17 +++++++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c
index 73aaab8..375f99f 100644
--- a/bin/dig/dighost.c
+++ b/bin/dig/dighost.c
@@ -4877,9 +4877,20 @@ idn_ace_to_locale(const char *from, char *to, size_t tolen) {
*/
res = idn2_to_unicode_8zlz(utf8_src, &tmp_str, 0);
if (res != IDN2_OK) {
- fatal("Cannot represent '%s' in the current locale (%s), "
- "use +noidnout or a different locale",
+ static bool warned = false;
+
+ res = idn2_to_ascii_8z(utf8_src, &tmp_str, 0);
+ if (res != IDN2_OK) {
+ fatal("Cannot represent '%s' "
+ "in the current locale nor ascii (%s), "
+ "use +noidnout or a different locale",
from, idn2_strerror(res));
+ } else if (!warned) {
+ fprintf(stderr, ";; Warning: cannot represent '%s' "
+ "in the current locale",
+ tmp_str);
+ warned = true;
+ }
}
/*
diff --git a/bin/tests/system/idna/tests.sh b/bin/tests/system/idna/tests.sh
index 7acb0fa..0269bcd 100644
--- a/bin/tests/system/idna/tests.sh
+++ b/bin/tests/system/idna/tests.sh
@@ -244,6 +244,23 @@ idna_enabled_test() {
idna_test "$text" "+idnin +noidnout" "xn--nxasmq6b.com" "xn--nxasmq6b.com."
idna_test "$text" "+idnin +idnout" "xn--nxasmq6b.com" "βόλοσ.com."
+ # Test of valid A-label in locale that cannot display it
+ #
+ # +noidnout: The string is sent as-is to the server and the returned qname
+ # is displayed in the same form.
+ # +idnout: The string is sent as-is to the server and the returned qname
+ # is displayed as the corresponding A-label.
+ #
+ # The "+[no]idnout" flag has no effect in these cases.
+ text="Checking valid A-label in C locale"
+ label="xn--nxasmq6b.com"
+ LC_ALL=C idna_test "$text" "" "$label" "$label."
+ LC_ALL=C idna_test "$text" "+noidnin +noidnout" "$label" "$label."
+ LC_ALL=C idna_test "$text" "+noidnin +idnout" "$label" "$label."
+ LC_ALL=C idna_test "$text" "+idnin +noidnout" "$label" "$label."
+ LC_ALL=C idna_test "$text" "+idnin +idnout" "$label" "$label."
+ LC_ALL=C idna_test "$text" "+noidnin +idnout" "$label" "$label."
+
# Tests of invalid A-labels
--
2.20.1

View File

@ -1,28 +0,0 @@
From 3466dfd7d44940821f195a36fceb0f1100f77c4e Mon Sep 17 00:00:00 2001
From: Mark Andrews <marka@isc.org>
Date: Tue, 5 Nov 2019 12:56:18 +1100
Subject: [PATCH] The default geoip-directory should be
<MAXMINDDB_PREFIX>/share/GeoIP
(cherry picked from commit fcd765a59db9b9a2b187448a90f3dbe6aa72fb84)
(cherry picked from commit 7e79ebeebada6bcca81e8368eef72efbaae3c8c7)
---
bin/named/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/named/config.c b/bin/named/config.c
index 833c1dc9d3..63da4b03f6 100644
--- a/bin/named/config.c
+++ b/bin/named/config.c
@@ -72,7 +72,7 @@ options {\n\
" files unlimited;\n"
#endif
#if defined(HAVE_GEOIP2) && !defined(WIN32)
-" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP2\";\n"
+" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP\";\n"
#elif defined(HAVE_GEOIP2)
" geoip-directory \".\";\n"
#endif
--
2.20.1

View File

@ -1,95 +0,0 @@
From 0698eb93f6e618d2882ae2c8758c5fa87524bea6 Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Tue, 23 Jul 2019 12:10:39 +0200
Subject: [PATCH] Allow explicitly using json-c but not libjson
Separate detection of json support. Allows explicit use of json-c when
jsoncpp package is found. Have to use --without-libjson --with-json-c.
---
configure.ac | 52 +++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 41 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index f7978e4..40b4f9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1331,7 +1331,6 @@ AC_ARG_WITH(libjson,
use_libjson="$withval", use_libjson="auto")
have_libjson=""
-have_libjson_c=""
case "$use_libjson" in
no)
libjson_libs=""
@@ -1347,7 +1346,43 @@ case "$use_libjson" in
LIBS="$LIBS -L${d}/lib"
fi
have_libjson="yes"
- elif test -f "${d}/include/json-c/json.h"
+ fi
+ done
+ ;;
+ *)
+ if test -f "${use_libjson}/include/json/json.h"
+ then
+ libjson_cflags="-I${use_libjson}/include"
+ LIBS="$LIBS -L${use_libjson}/lib"
+ have_libjson="yes"
+ else
+ AC_MSG_ERROR([$use_libjson/include/json/json.h not found.])
+ fi
+ ;;
+esac
+
+#
+# was --with-json-c specified?
+#
+AC_ARG_WITH(json-c,
+ AS_HELP_STRING([--with-json-c[=PATH]],
+ [build with json-c library [yes|no|path]]),
+ use_json_c="$withval", use_json_c="$use_libjson")
+
+if test "X${have_libjson}" != "X"
+then
+ # Do not use if libjson were found
+ use_json_c=no
+fi
+
+have_libjson_c=""
+case "$use_json_c" in
+ no)
+ ;;
+ auto|yes)
+ for d in /usr /usr/local /opt/local
+ do
+ if test -f "${d}/include/json-c/json.h"
then
if test ${d} != /usr
then
@@ -1360,19 +1395,14 @@ case "$use_libjson" in
done
;;
*)
- if test -f "${use_libjson}/include/json/json.h"
- then
- libjson_cflags="-I${use_libjson}/include"
- LIBS="$LIBS -L${use_libjson}/lib"
- have_libjson="yes"
- elif test -f "${use_libjson}/include/json-c/json.h"
+ if test -f "${use_json_c}/include/json-c/json.h"
then
- libjson_cflags="-I${use_libjson}/include"
- LIBS="$LIBS -L${use_libjson}/lib"
+ libjson_cflags="-I${use_json_c}/include"
+ LIBS="$LIBS -L${use_json_c}/lib"
have_libjson="yes"
have_libjson_c="yes"
else
- AC_MSG_ERROR([$use_libjson/include/json{,-c}/json.h not found.])
+ AC_MSG_ERROR([$use_json_c/include/json-c/json.h not found.])
fi
;;
esac
--
2.20.1

View File

@ -1,508 +0,0 @@
From f11331c0b021196f18a51cfde203d8d221beb865 Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Sun, 23 Aug 2020 00:54:23 +0200
Subject: [PATCH] Modify build to create also pkcs11 version
---
Makefile.top | 19 ++++++++++
bin/Makefile.am | 2 ++
bin/dnssec-pkcs11/Makefile.am | 56 ++++++++++++++++++++++-------
bin/named-pkcs11/Makefile.am | 18 +++++-----
configure.ac | 7 ++++
lib/Makefile.am | 1 +
lib/dns-pkcs11/Makefile.am | 62 ++++++++++++++++----------------
lib/dns-pkcs11/tests/Makefile.am | 4 +--
lib/ns-pkcs11/Makefile.am | 22 ++++++------
lib/ns-pkcs11/tests/Makefile.am | 8 ++---
10 files changed, 129 insertions(+), 70 deletions(-)
diff --git a/Makefile.top b/Makefile.top
index 140ab44..a2410b2 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -42,14 +42,26 @@ LIBDNS_CFLAGS = \
LIBDNS_LIBS = \
$(top_builddir)/lib/dns/libdns.la
+LIBDNS_PKCS11_CFLAGS = \
+ -DUSE_PKCS11 \
+ -I$(top_srcdir)/lib/dns-pkcs11/include \
+ -I$(top_builddir)/lib/dns-pkcs11/include
+
+LIBDNS_PKCS11_LIBS = \
+ $(top_builddir)/lib/dns-pkcs11/libdns-pkcs11.la
+
if HAVE_DNSTAP
LIBDNS_CFLAGS += \
$(DNSTAP_CFLAGS)
+LIBDNS_PKCS11_CFLAGS += \
+ $(DNSTAP_CFLAGS)
endif HAVE_DNSTAP
if HAVE_LMDB
LIBDNS_CFLAGS += \
$(LMDB_CFLAGS)
+LIBDNS_PKCS11_CFLAGS += \
+ $(LMDB_CFLAGS)
endif HAVE_LMDB
LIBNS_CFLAGS = \
@@ -58,6 +70,13 @@ LIBNS_CFLAGS = \
LIBNS_LIBS = \
$(top_builddir)/lib/ns/libns.la
+LIBNS_PKCS11_CFLAGS = \
+ -I$(top_srcdir)/lib/ns-pkcs11/include \
+ -DUSE_PKCS11
+
+LIBNS_PKCS11_LIBS = \
+ $(top_builddir)/lib/ns-pkcs11/libns-pkcs11.la
+
LIBIRS_CFLAGS = \
-I$(top_srcdir)/lib/irs/include
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 296a022..bf0a68c 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -3,3 +3,5 @@ SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen tests plugins
if HAVE_PKCS11
SUBDIRS += pkcs11
endif
+
+SUBDIRS += named-pkcs11 dnssec-pkcs11
diff --git a/bin/dnssec-pkcs11/Makefile.am b/bin/dnssec-pkcs11/Makefile.am
index 7aeaccc..efcc90b 100644
--- a/bin/dnssec-pkcs11/Makefile.am
+++ b/bin/dnssec-pkcs11/Makefile.am
@@ -2,37 +2,67 @@ include $(top_srcdir)/Makefile.top
AM_CPPFLAGS += \
$(LIBISC_CFLAGS) \
- $(LIBDNS_CFLAGS)
+ $(LIBDNS_PKCS11_CFLAGS)
AM_CPPFLAGS += \
- -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
+ -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" \
+ -DUSE_PKCS11=1
+
+EXEEXT = -pkcs11
noinst_LTLIBRARIES = libdnssectool.la
LDADD = \
libdnssectool.la \
$(LIBISC_LIBS) \
- $(LIBDNS_LIBS)
+ $(LIBDNS_PKCS11_LIBS)
bin_PROGRAMS = \
dnssec-cds \
- dnssec-dsfromkey \
- dnssec-importkey \
- dnssec-keyfromlabel \
- dnssec-keygen \
- dnssec-revoke \
- dnssec-settime \
- dnssec-signzone \
- dnssec-verify
+ dnssec-dsfromkey-pkcs11 \
+ dnssec-importkey-pkcs11 \
+ dnssec-keyfromlabel-pkcs11 \
+ dnssec-keygen-pkcs11 \
+ dnssec-revoke-pkcs11 \
+ dnssec-settime-pkcs11 \
+ dnssec-signzone-pkcs11 \
+ dnssec-verify-pkcs11
libdnssectool_la_SOURCES = \
dnssectool.h \
dnssectool.c
-dnssec_keygen_CPPFLAGS = \
+dnssec_keygen_pkcs11_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBISCCFG_CFLAGS)
-dnssec_keygen_LDADD = \
+dnssec_keygen_pkcs11_LDADD = \
$(LDADD) \
$(LIBISCCFG_LIBS)
+
+dnssec_cds_pkcs11_SOURCES = \
+ dnssec-cds.c
+
+dnssec_keygen_pkcs11_SOURCES = \
+ dnssec-keygen.c
+
+dnssec_dsfromkey_pkcs11_SOURCES = \
+ dnssec-dsfromkey.c
+
+dnssec_importkey_pkcs11_SOURCES = \
+ dnssec-importkey.c
+
+dnssec_keyfromlabel_pkcs11_SOURCES = \
+ dnssec-keyfromlabel.c
+
+dnssec_revoke_pkcs11_SOURCES = \
+ dnssec-revoke.c
+
+dnssec_settime_pkcs11_SOURCES = \
+ dnssec-settime.c
+
+dnssec_signzone_pkcs11_SOURCES = \
+ dnssec-signzone.c
+
+dnssec_verify_pkcs11_SOURCES = \
+ dnssec-verify.c
diff --git a/bin/named-pkcs11/Makefile.am b/bin/named-pkcs11/Makefile.am
index 90ebc3a..c6b992c 100644
--- a/bin/named-pkcs11/Makefile.am
+++ b/bin/named-pkcs11/Makefile.am
@@ -4,8 +4,8 @@ AM_CPPFLAGS += \
-I$(srcdir)/unix/include \
-I$(top_builddir)/include \
$(LIBISC_CFLAGS) \
- $(LIBDNS_CFLAGS) \
- $(LIBNS_CFLAGS) \
+ $(LIBDNS_PKCS11_CFLAGS) \
+ $(LIBNS_PKCS11_CFLAGS) \
$(LIBISCCC_CFLAGS) \
$(LIBISCCFG_CFLAGS) \
$(LIBBIND9_CFLAGS) \
@@ -32,7 +32,7 @@ AM_CPPFLAGS += \
-DNAMED_LOCALSTATEDIR=\"${localstatedir}\" \
-DNAMED_SYSCONFDIR=\"${sysconfdir}\"
-sbin_PROGRAMS = named
+sbin_PROGRAMS = named-pkcs11
bin_PROGRAMS = \
feature-test \
@@ -58,7 +58,7 @@ xsl.c: bind9.xsl Makefile
echo ";") \
< "${srcdir}/bind9.xsl" > $@
-named_SOURCES = \
+named_pkcs11_SOURCES = \
builtin.c \
config.c \
control.c \
@@ -97,14 +97,14 @@ named_SOURCES = \
if HAVE_GEOIP2
AM_CPPFLAGS += \
-DMAXMINDDB_PREFIX=\"@MAXMINDDB_PREFIX@\"
-named_SOURCES += \
+named_pkcs11_SOURCES += \
geoip.c
endif
-named_LDADD = \
+named_pkcs11_LDADD = \
$(LIBISC_LIBS) \
- $(LIBDNS_LIBS) \
- $(LIBNS_LIBS) \
+ $(LIBDNS_PKCS11_LIBS) \
+ $(LIBNS_PKCS11_LIBS) \
$(LIBISCCC_LIBS) \
$(LIBISCCFG_LIBS) \
$(LIBBIND9_LIBS) \
@@ -118,7 +118,7 @@ named_LDADD = \
$(ZLIB_LIBS)
if HAVE_JSON_C
-named_LDADD += \
+named_pkcs11_LDADD += \
$(JSON_C_LIBS)
endif HAVE_JSON_C
diff --git a/configure.ac b/configure.ac
index fcb7cfd..36040f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1672,6 +1672,13 @@ AC_CONFIG_FILES([bin/tests/Makefile
bin/tests/system/dyndb/driver/Makefile
bin/tests/system/dlzexternal/driver/Makefile])
+# PKCS11 binaries
+AC_CONFIG_FILES([bin/dnssec-pkcs11/Makefile
+ bin/named-pkcs11/Makefile
+ lib/dns-pkcs11/Makefile
+ lib/ns-pkcs11/Makefile
+ lib/ns-pkcs11/tests/Makefile])
+
AC_CONFIG_FILES([bin/tests/system/ifconfig.sh],
[chmod +x bin/tests/system/ifconfig.sh])
AC_CONFIG_FILES([bin/tests/system/run.sh],
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 5cbaf3c..43ea73c 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,3 +1,4 @@
include $(top_srcdir)/Makefile.top
SUBDIRS = isc dns isccc ns isccfg bind9 irs samples
+SUBDIRS += dns-pkcs11 ns-pkcs11
diff --git a/lib/dns-pkcs11/Makefile.am b/lib/dns-pkcs11/Makefile.am
index 78a2752..0503763 100644
--- a/lib/dns-pkcs11/Makefile.am
+++ b/lib/dns-pkcs11/Makefile.am
@@ -1,12 +1,12 @@
include $(top_srcdir)/Makefile.top
-lib_LTLIBRARIES = libdns.la
+lib_LTLIBRARIES = libdns-pkcs11.la
-nodist_libdns_ladir = $(includedir)/dns
+nodist_libdns_ladir = $(includedir)/dns-pkcs11
nodist_libdns_la_HEADERS = \
- include/dns/enumclass.h \
- include/dns/enumtype.h \
- include/dns/rdatastruct.h
+ include/dns-pkcs11/enumclass.h \
+ include/dns-pkcs11/enumtype.h \
+ include/dns-pkcs11/rdatastruct.h
nodist_libdns_la_SOURCES = \
$(nodist_libdns_la_HEADERS) \
@@ -48,8 +48,8 @@ include/dns/rdatastruct.h: gen rdata/rdatastructpre.h rdata/rdatastructsuf.h Mak
code.h: gen Makefile
$(builddir)/gen -s $(srcdir) > $@
-libdns_ladir = $(includedir)/dns
-libdns_la_HEADERS = \
+libdns_pkcs11_ladir = $(includedir)/dns-pkcs11
+libdns_pkcs11_la_HEADERS = \
include/dns/acl.h \
include/dns/adb.h \
include/dns/badcache.h \
@@ -154,8 +154,8 @@ dst_HEADERS = \
include/dst/gssapi.h \
include/dst/result.h
-libdns_la_SOURCES = \
- $(libdns_la_HEADERS) \
+libdns_pkcs11_la_SOURCES = \
+ $(libdns_pkcs11_la_HEADERS) \
$(dst_HEADERS) \
acl.c \
adb.c \
@@ -257,92 +257,92 @@ libdns_la_SOURCES = \
zone_p.h
if HAVE_GSSAPI
-libdns_la_SOURCES += \
+libdns_pkcs11_la_SOURCES += \
gssapi_link.c
endif
if HAVE_PKCS11
-libdns_la_SOURCES += \
+libdns_pkcs11_la_SOURCES += \
pkcs11.c \
pkcs11ecdsa_link.c \
pkcs11eddsa_link.c \
pkcs11rsa_link.c
else !HAVE_PKCS11
-libdns_la_SOURCES += \
+libdns_pkcs11_la_SOURCES += \
opensslecdsa_link.c \
openssleddsa_link.c \
opensslrsa_link.c
endif
if HAVE_GEOIP2
-libdns_la_SOURCES += \
+libdns_pkcs11_la_SOURCES += \
geoip2.c
endif
-libdns_la_CPPFLAGS = \
+libdns_pkcs11_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBISC_CFLAGS) \
- $(LIBDNS_CFLAGS) \
+ $(LIBDNS_PKCS11_CFLAGS) \
$(OPENSSL_CFLAGS) \
$(LIBLTDL_CFLAGS)
-libdns_la_LDFLAGS = \
+libdns_pkcs11_la_LDFLAGS = \
$(libdns_VERSION_INFO)
-libdns_la_LIBADD = \
+libdns_pkcs11_la_LIBADD = \
$(LIBISC_LIBS) \
$(OPENSSL_LIBS)
if HAVE_JSON_C
-libdns_la_CPPFLAGS += \
+libdns_pkcs11_la_CPPFLAGS += \
$(JSON_C_CFLAGS)
-libdns_la_LIBADD += \
+libdns_pkcs11_la_LIBADD += \
$(JSON_C_LIBS)
endif HAVE_JSON_C
if HAVE_LIBXML2
-libdns_la_CPPFLAGS += \
+libdns_pkcs11_la_CPPFLAGS += \
$(LIBXML2_CFLAGS)
-libdns_la_LIBADD += \
+libdns_pkcs11_la_LIBADD += \
$(LIBXML2_LIBS)
endif HAVE_LIBXML2
if HAVE_GSSAPI
-libdns_la_CPPFLAGS += \
+libdns_pkcs11_la_CPPFLAGS += \
$(GSSAPI_CFLAGS) \
$(KRB5_CFLAGS)
-libdns_la_LIBADD += \
+libdns_pkcs11_la_LIBADD += \
$(GSSAPI_LIBS) \
$(KRB5_LIBS)
endif
if HAVE_GEOIP2
-libdns_la_CPPFLAGS += \
+libdns_pkcs11_la_CPPFLAGS += \
$(MAXMINDDB_CFLAGS)
-libdns_la_LDFLAGS += \
+libdns_pkcs11_la_LDFLAGS += \
$(MAXMINDDB_LIBS)
endif
if HAVE_DNSTAP
-nodist_libdns_la_SOURCES += \
+nodist_libdns_pkcs11_la_SOURCES += \
dnstap.pb-c.h \
dnstap.pb-c.c
-libdns_la_SOURCES += \
+libdns_pkcs11_la_SOURCES += \
dnstap.c
dnstap.pb-c.h dnstap.pb-c.c: dnstap.proto
$(PROTOC_C) --proto_path=$(srcdir) --c_out=. dnstap.proto
-libdns_la_CPPFLAGS += $(DNSTAP_CFLAGS)
-libdns_la_LIBADD += $(DNSTAP_LIBS)
+libdns_pkcs11_la_CPPFLAGS += $(DNSTAP_CFLAGS)
+libdns_pkcs11_la_LIBADD += $(DNSTAP_LIBS)
endif
if HAVE_LMDB
-libdns_la_CPPFLAGS += $(LMDB_CFLAGS)
-libdns_la_LIBADD += $(LMDB_LIBS)
+libdns_pkcs11_la_CPPFLAGS += $(LMDB_CFLAGS)
+libdns_pkcs11_la_LIBADD += $(LMDB_LIBS)
endif
if HAVE_CMOCKA
diff --git a/lib/dns-pkcs11/tests/Makefile.am b/lib/dns-pkcs11/tests/Makefile.am
index 04ef09c..35b2eac 100644
--- a/lib/dns-pkcs11/tests/Makefile.am
+++ b/lib/dns-pkcs11/tests/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.tests
AM_CPPFLAGS += \
$(LIBISC_CFLAGS) \
- $(LIBDNS_CFLAGS) \
+ $(LIBDNS_PKCS11_CFLAGS) \
$(KRB5_CFLAGS) \
-DSRCDIR=\"$(abs_srcdir)\" \
-DBUILDDIR=\"$(abs_builddir)\"
@@ -11,7 +11,7 @@ AM_CPPFLAGS += \
LDADD += \
libdnstest.la \
$(LIBISC_LIBS) \
- $(LIBDNS_LIBS)
+ $(LIBDNS_PKCS11_LIBS)
check_LTLIBRARIES = libdnstest.la
libdnstest_la_SOURCES = dnstest.c dnstest.h
diff --git a/lib/ns-pkcs11/Makefile.am b/lib/ns-pkcs11/Makefile.am
index b2f81cc..b77b1ee 100644
--- a/lib/ns-pkcs11/Makefile.am
+++ b/lib/ns-pkcs11/Makefile.am
@@ -3,11 +3,11 @@ include $(top_srcdir)/Makefile.top
AM_CPPFLAGS += \
-DNAMED_PLUGINDIR=\"$(libdir)/named\"
-lib_LTLIBRARIES = libns.la
+lib_LTLIBRARIES = libns-pkcs11.la
-libns_ladir = $(includedir)/ns
+libns_pkcs11_ladir = $(includedir)/ns
-libns_la_HEADERS = \
+libns_pkcs11_la_HEADERS = \
include/ns/client.h \
include/ns/hooks.h \
include/ns/interfacemgr.h \
@@ -23,8 +23,8 @@ libns_la_HEADERS = \
include/ns/update.h \
include/ns/xfrout.h
-libns_la_SOURCES = \
- $(libns_la_HEADERS) \
+libns_pkcs11_la_SOURCES = \
+ $(libns_pkcs11_la_HEADERS) \
client.c \
hooks.c \
interfacemgr.c \
@@ -39,18 +39,18 @@ libns_la_SOURCES = \
update.c \
xfrout.c
-libns_la_CPPFLAGS = \
+libns_pkcs11_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBISC_CFLAGS) \
- $(LIBDNS_CFLAGS) \
- $(LIBNS_CFLAGS) \
+ $(LIBDNS_PKCS11_CFLAGS) \
+ $(LIBNS_PKCS11_CFLAGS) \
$(LIBLTDL_CFLAGS)
-libns_la_LIBADD = \
+libns_pkcs11_la_LIBADD = \
$(LIBISC_LIBS) \
- $(LIBDNS_LIBS)
+ $(LIBDNS_PKCS11_LIBS)
-libns_la_LDFLAGS = \
+libns_pkcs11_la_LDFLAGS = \
$(libns_VERSION_INFO)
if HAVE_CMOCKA
diff --git a/lib/ns-pkcs11/tests/Makefile.am b/lib/ns-pkcs11/tests/Makefile.am
index 092360c..b07c9f7 100644
--- a/lib/ns-pkcs11/tests/Makefile.am
+++ b/lib/ns-pkcs11/tests/Makefile.am
@@ -3,14 +3,14 @@ include $(top_srcdir)/Makefile.tests
AM_CPPFLAGS += \
$(LIBISC_CFLAGS) \
- $(LIBDNS_CFLAGS) \
- $(LIBNS_CFLAGS)
+ $(LIBDNS_PKCS11_CFLAGS) \
+ $(LIBNS_PKCS11_CFLAGS)
LDADD += \
libnstest.la \
$(LIBISC_LIBS) \
- $(LIBDNS_LIBS) \
- $(LIBNS_LIBS)
+ $(LIBDNS_PKCS11_LIBS) \
+ $(LIBNS_PKCS11_LIBS)
check_LTLIBRARIES = libnstest.la
libnstest_la_SOURCES = nstest.c nstest.h
--
2.26.2