Tomas Hozza dce2d1
diff --git a/bin/Makefile.in b/bin/Makefile.in
df81e8
index 9ad7f62..094775a 100644
Tomas Hozza dce2d1
--- a/bin/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/Makefile.in
df81e8
@@ -11,7 +11,7 @@ srcdir =	@srcdir@
Tomas Hozza dce2d1
 VPATH =		@srcdir@
Tomas Hozza dce2d1
 top_srcdir =	@top_srcdir@
Tomas Hozza dce2d1
 
a38c25
-SUBDIRS =	named rndc dig delv dnssec tools nsupdate check confgen \
df81e8
+SUBDIRS =	named named-pkcs11 rndc dig delv dnssec dnssec-pkcs11 tools nsupdate check confgen \
df81e8
 		@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
Tomas Hozza dce2d1
 TARGETS =
Tomas Hozza dce2d1
 
05dbc8
diff --git a/bin/confgen/Makefile.in b/bin/confgen/Makefile.in
05dbc8
index 1e0fe0e..dc3a7f6 100644
05dbc8
--- a/bin/confgen/Makefile.in
05dbc8
+++ b/bin/confgen/Makefile.in
05dbc8
@@ -22,7 +22,7 @@ VERSION=@BIND9_VERSION@
05dbc8
 CINCLUDES = -I${srcdir}/include ${ISC_INCLUDES} ${ISCCC_INCLUDES} \
05dbc8
 	${ISCCFG_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES}
05dbc8
 
05dbc8
-CDEFINES = @USE_PKCS11@
05dbc8
+CDEFINES =
05dbc8
 CWARNINGS =
05dbc8
 
05dbc8
 ISCCFGLIBS =	../../lib/isccfg/libisccfg.@A@
05dbc8
diff --git a/bin/dig/Makefile.in b/bin/dig/Makefile.in
05dbc8
index 2317ec0..0601939 100644
05dbc8
--- a/bin/dig/Makefile.in
05dbc8
+++ b/bin/dig/Makefile.in
05dbc8
@@ -21,7 +21,7 @@ CINCLUDES =	-I${srcdir}/include ${DNS_INCLUDES} \
05dbc8
 		${BIND9_INCLUDES} ${ISC_INCLUDES} \
05dbc8
 		${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@
05dbc8
 
05dbc8
-CDEFINES =	-DVERSION=\"${VERSION}\" @USE_PKCS11@
05dbc8
+CDEFINES =	-DVERSION=\"${VERSION}\"
05dbc8
 CWARNINGS =
05dbc8
 
05dbc8
 ISCCFGLIBS =	../../lib/isccfg/libisccfg.@A@
Tomas Hozza dce2d1
diff --git a/bin/dnssec-pkcs11/Makefile.in b/bin/dnssec-pkcs11/Makefile.in
05dbc8
index 1dad340..ffac64e 100644
Tomas Hozza dce2d1
--- a/bin/dnssec-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/dnssec-pkcs11/Makefile.in
05dbc8
@@ -15,16 +15,16 @@ VERSION=@BIND9_VERSION@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 @BIND9_MAKE_INCLUDES@
Tomas Hozza dce2d1
 
df81e8
-CINCLUDES =	${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
05dbc8
+CINCLUDES =	${DNS_PKCS11_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
Tomas Hozza dce2d1
 
05dbc8
 CDEFINES =	-DVERSION=\"${VERSION}\" @USE_PKCS11@
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
2dbb09
-DNSLIBS =	../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
05dbc8
+DNSLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_PK11_LIBS@
05dbc8
 ISCLIBS =	../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
05dbc8
 ISCNOSYMLIBS =	../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-DNSDEPLIBS =	../../lib/dns/libdns.@A@
Tomas Hozza dce2d1
+DNSDEPLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@
05dbc8
 ISCDEPLIBS =	../../lib/isc/libisc.@A@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 DEPLIBS =	${DNSDEPLIBS} ${ISCDEPLIBS}
df81e8
@@ -34,11 +34,11 @@ LIBS =		${DNSLIBS} ${ISCLIBS} @LIBS@
Tomas Hozza dce2d1
 NOSYMLIBS =	${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 # Alphabetically
df81e8
-TARGETS =	dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \
df81e8
-		dnssec-importkey@EXEEXT@ dnssec-keyfromlabel@EXEEXT@ \
df81e8
-		dnssec-keygen@EXEEXT@ dnssec-revoke@EXEEXT@ \
df81e8
-		dnssec-settime@EXEEXT@ dnssec-signzone@EXEEXT@ \
df81e8
-		dnssec-verify@EXEEXT@
df81e8
+TARGETS =	dnssec-cds-pkcs11@EXEEXT@ dnssec-dsfromkey-pkcs11@EXEEXT@ \
df81e8
+		dnssec-importkey-pkcs11@EXEEXT@ dnssec-keyfromlabel-pkcs11@EXEEXT@ \
df81e8
+		dnssec-keygen-pkcs11@EXEEXT@ dnssec-revoke-pkcs11@EXEEXT@ \
df81e8
+		dnssec-settime-pkcs11@EXEEXT@ dnssec-signzone-pkcs11@EXEEXT@ \
df81e8
+		dnssec-verify-pkcs11@EXEEXT@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 OBJS =		dnssectool.@O@
Tomas Hozza dce2d1
 
df81e8
@@ -61,19 +61,19 @@ MANOBJS =	${MANPAGES} ${HTMLPAGES}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 @BIND9_MAKE_RULES@
Tomas Hozza dce2d1
 
df81e8
-dnssec-cds@EXEEXT@: dnssec-cds.@O@ ${OBJS} ${DEPLIBS}
df81e8
+dnssec-cds-pkcs11@EXEEXT@: dnssec-cds.@O@ ${OBJS} ${DEPLIBS}
df81e8
 	export BASEOBJS="dnssec-cds.@O@ ${OBJS}"; \
df81e8
 	${FINALBUILDCMD}
df81e8
 
Tomas Hozza dce2d1
-dnssec-dsfromkey@EXEEXT@: dnssec-dsfromkey.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
+dnssec-dsfromkey-pkcs11@EXEEXT@: dnssec-dsfromkey.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	export BASEOBJS="dnssec-dsfromkey.@O@ ${OBJS}"; \
Tomas Hozza dce2d1
 	${FINALBUILDCMD}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-dnssec-keyfromlabel@EXEEXT@: dnssec-keyfromlabel.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
+dnssec-keyfromlabel-pkcs11@EXEEXT@: dnssec-keyfromlabel.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	export BASEOBJS="dnssec-keyfromlabel.@O@ ${OBJS}"; \
Tomas Hozza dce2d1
 	${FINALBUILDCMD}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-dnssec-keygen@EXEEXT@: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
+dnssec-keygen-pkcs11@EXEEXT@: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	export BASEOBJS="dnssec-keygen.@O@ ${OBJS}"; \
Tomas Hozza dce2d1
 	${FINALBUILDCMD}
Tomas Hozza dce2d1
 
df81e8
@@ -81,7 +81,7 @@ dnssec-signzone.@O@: dnssec-signzone.c
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
Tomas Hozza dce2d1
 		-c ${srcdir}/dnssec-signzone.c
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-dnssec-signzone@EXEEXT@: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
+dnssec-signzone-pkcs11@EXEEXT@: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	export BASEOBJS="dnssec-signzone.@O@ ${OBJS}"; \
Tomas Hozza dce2d1
 	${FINALBUILDCMD}
Tomas Hozza dce2d1
 
df81e8
@@ -89,19 +89,19 @@ dnssec-verify.@O@: dnssec-verify.c
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
Tomas Hozza dce2d1
 		-c ${srcdir}/dnssec-verify.c
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-dnssec-verify@EXEEXT@: dnssec-verify.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
+dnssec-verify-pkcs11@EXEEXT@: dnssec-verify.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	export BASEOBJS="dnssec-verify.@O@ ${OBJS}"; \
Tomas Hozza dce2d1
 	${FINALBUILDCMD}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-dnssec-revoke@EXEEXT@: dnssec-revoke.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
+dnssec-revoke-pkcs11@EXEEXT@: dnssec-revoke.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Tomas Hozza dce2d1
 	dnssec-revoke.@O@ ${OBJS} ${LIBS}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-dnssec-settime@EXEEXT@: dnssec-settime.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
+dnssec-settime-pkcs11@EXEEXT@: dnssec-settime.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Tomas Hozza dce2d1
 	dnssec-settime.@O@ ${OBJS} ${LIBS}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-dnssec-importkey@EXEEXT@: dnssec-importkey.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
+dnssec-importkey-pkcs11@EXEEXT@: dnssec-importkey.@O@ ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
Tomas Hozza dce2d1
 	dnssec-importkey.@O@ ${OBJS} ${LIBS}
Tomas Hozza dce2d1
 
df81e8
@@ -112,16 +112,14 @@ docclean manclean maintainer-clean::
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 installdirs:
Tomas Hozza dce2d1
 	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
Tomas Hozza dce2d1
-	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
Tomas Hozza dce2d1
 
20ccb8
 install-man8: ${MANPAGES}
20ccb8
 	${INSTALL_DATA} $^ ${DESTDIR}${mandir}/man8
20ccb8
 
20ccb8
-install:: ${TARGETS} installdirs install-man8
20ccb8
+install:: ${TARGETS} installdirs
ad7b3b
 	for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir} || exit 1; done
Tomas Hozza dce2d1
 
102df2
 uninstall::
ad7b3b
-	for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done
ad7b3b
 	for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t || exit 1; done
102df2
 
Tomas Hozza dce2d1
 clean distclean::
05dbc8
diff --git a/bin/dnssec/Makefile.in b/bin/dnssec/Makefile.in
05dbc8
index 1dad340..321058b 100644
05dbc8
--- a/bin/dnssec/Makefile.in
05dbc8
+++ b/bin/dnssec/Makefile.in
05dbc8
@@ -17,7 +17,7 @@ VERSION=@BIND9_VERSION@
05dbc8
 
05dbc8
 CINCLUDES =	${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
05dbc8
 
05dbc8
-CDEFINES =	-DVERSION=\"${VERSION}\" @USE_PKCS11@
05dbc8
+CDEFINES =	-DVERSION=\"${VERSION}\"
05dbc8
 CWARNINGS =
05dbc8
 
05dbc8
 DNSLIBS =	../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
Tomas Hozza dce2d1
diff --git a/bin/named-pkcs11/Makefile.in b/bin/named-pkcs11/Makefile.in
05dbc8
index e5b0d4b..b739869 100644
Tomas Hozza dce2d1
--- a/bin/named-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/named-pkcs11/Makefile.in
05dbc8
@@ -43,7 +43,7 @@ DLZDRIVER_INCLUDES =	@DLZ_DRIVER_INCLUDES@
Tomas Hozza dce2d1
 DLZDRIVER_LIBS =	@DLZ_DRIVER_LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CINCLUDES =	-I${srcdir}/include -I${srcdir}/unix/include -I. \
df81e8
-		${NS_INCLUDES} ${DNS_INCLUDES} \
05dbc8
+		${NS_PKCS11_INCLUDES} ${DNS_PKCS11_INCLUDES} \
df81e8
 		${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
05dbc8
 		${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \
2dbb09
 		${DBDRIVER_INCLUDES} ${MAXMINDDB_CFLAGS} \
05dbc8
@@ -53,37 +53,37 @@ CDEFINES =      @CONTRIB_DLZ@ @USE_PKCS11@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
2dbb09
-DNSLIBS =	../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
05dbc8
+DNSLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_PK11_LIBS@
Tomas Hozza dce2d1
 ISCCFGLIBS =	../../lib/isccfg/libisccfg.@A@
Tomas Hozza dce2d1
 ISCCCLIBS =	../../lib/isccc/libisccc.@A@
05dbc8
 ISCLIBS =	../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
05dbc8
 ISCNOSYMLIBS =	../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
Tomas Hozza dce2d1
 BIND9LIBS =	../../lib/bind9/libbind9.@A@
05dbc8
-NSLIBS =	../../lib/ns/libns.@A@
05dbc8
+NSLIBS =	../../lib/ns-pkcs11/libns-pkcs11.@A@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-DNSDEPLIBS =	../../lib/dns/libdns.@A@
371a1e
+DNSDEPLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@
Tomas Hozza dce2d1
 ISCCFGDEPLIBS =	../../lib/isccfg/libisccfg.@A@
Tomas Hozza dce2d1
 ISCCCDEPLIBS =	../../lib/isccc/libisccc.@A@
05dbc8
 ISCDEPLIBS =	../../lib/isc/libisc.@A@
Tomas Hozza dce2d1
 BIND9DEPLIBS =	../../lib/bind9/libbind9.@A@
05dbc8
-NSDEPLIBS =	../../lib/ns/libns.@A@
05dbc8
+NSDEPLIBS =	../../lib/ns-pkcs11/libns-pkcs11.@A@
Tomas Hozza dce2d1
 
05dbc8
 DEPLIBS =	${NSDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
05dbc8
 		${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS}
Tomas Hozza dce2d1
 
df81e8
 LIBS =		${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
Tomas Hozza dce2d1
 		${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \
df81e8
-		${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
df81e8
+		@LIBCAP_LIBS@ \
df81e8
 		@LIBS@
Tomas Hozza dce2d1
 
df81e8
 NOSYMLIBS =	${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
Tomas Hozza dce2d1
 		${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
df81e8
-		${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
df81e8
+		@LIBCAP_LIBS@ \
df81e8
 		@LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 SUBDIRS =	unix
Tomas Hozza dce2d1
 
df81e8
-TARGETS =	named@EXEEXT@ feature-test@EXEEXT@
d0d728
+TARGETS =	named-pkcs11@EXEEXT@ feature-test-pkcs11@EXEEXT@
Tomas Hozza dce2d1
 
Tomas Hozza 4fa997
 GEOIPLINKOBJS = geoip.@O@
2dbb09
 GEOIP2LINKOBJS = geoip.@O@
2dbb09
@@ -93,8 +93,7 @@ OBJS =		builtin.@O@ config.@O@ control.@O@ \
2dbb09
 		@GEOIPLINKOBJS@ @GEOIP2LINKOBJS@ \
df81e8
 		log.@O@ logconf.@O@ main.@O@ \
df81e8
 		server.@O@ statschannel.@O@ \
df81e8
-		tkeyconf.@O@ tsigconf.@O@ zoneconf.@O@ \
Tomas Hozza dce2d1
-		${DLZDRIVER_OBJS} ${DBDRIVER_OBJS}
df81e8
+		tkeyconf.@O@ tsigconf.@O@ zoneconf.@O@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 UOBJS =		unix/os.@O@ unix/dlz_dlopen_driver.@O@
Tomas Hozza dce2d1
 
2dbb09
@@ -108,8 +107,7 @@ SRCS =		builtin.c config.c control.c \
2dbb09
 		@GEOIPLINKSRCS@ @GEOIP2LINKSRCS@ \
df81e8
 		log.c logconf.c main.c \
df81e8
 		server.c statschannel.c \
df81e8
-		tkeyconf.c tsigconf.c zoneconf.c \
Tomas Hozza dce2d1
-		${DLZDRIVER_SRCS} ${DBDRIVER_SRCS}
df81e8
+		tkeyconf.c tsigconf.c zoneconf.c
Tomas Hozza dce2d1
 
df81e8
 MANPAGES =	named.8 named.conf.5
Tomas Hozza dce2d1
 
2dbb09
@@ -149,7 +147,7 @@ server.@O@: server.c
Michal Ruprich d886cd
 		-DPRODUCT=\"${PRODUCT}\" \
Michal Ruprich d886cd
 		-DVERSION=\"${VERSION}\" -c ${srcdir}/server.c
Tomas Hozza dce2d1
 
cb2172
-named@EXEEXT@: ${OBJS} ${DEPLIBS}
cb2172
+named-pkcs11@EXEEXT@: ${OBJS} ${DEPLIBS}
Tomas Hozza dce2d1
 	export MAKE_SYMTABLE="yes"; \
Tomas Hozza dce2d1
 	export BASEOBJS="${OBJS} ${UOBJS}"; \
Tomas Hozza dce2d1
 	${FINALBUILDCMD}
2dbb09
@@ -159,7 +157,7 @@ feature-test.@O@: ${top_srcdir}/bin/tests/system/feature-test.c
d0d728
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
d0d728
 		-c ${top_srcdir}/bin/tests/system/feature-test.c
d0d728
 
d0d728
-feature-test@EXEEXT@: feature-test.@O@
d0d728
+feature-test-pkcs11@EXEEXT@: feature-test.@O@
d0d728
 	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
d0d728
 		-o $@ feature-test.@O@ ${ISCLIBS} ${LIBS}
cb2172
 
2dbb09
@@ -192,13 +190,13 @@ install-man8: named.8
Tomas Hozza dce2d1
 
20ccb8
 install-man: install-man5 install-man8
Michal Ruprich d886cd
 
df81e8
-install:: named@EXEEXT@ installdirs install-man
Tomas Hozza dce2d1
-	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
df81e8
+install:: named-pkcs11@EXEEXT@ installdirs install-man
Tomas Hozza dce2d1
+	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-pkcs11@EXEEXT@ ${DESTDIR}${sbindir}
Tomas Hozza dce2d1
 
102df2
 uninstall::
df81e8
 	rm -f ${DESTDIR}${mandir}/man5/named.conf.5
df81e8
 	rm -f ${DESTDIR}${mandir}/man8/named.8
102df2
-	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named@EXEEXT@
102df2
+	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-pkcs11@EXEEXT@
102df2
 
Tomas Hozza dce2d1
 @DLZ_DRIVER_RULES@
Tomas Hozza dce2d1
 
05dbc8
diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in
05dbc8
index e5b0d4b..eecfa76 100644
05dbc8
--- a/bin/named/Makefile.in
05dbc8
+++ b/bin/named/Makefile.in
05dbc8
@@ -49,7 +49,7 @@ CINCLUDES =	-I${srcdir}/include -I${srcdir}/unix/include -I. \
05dbc8
 		${DBDRIVER_INCLUDES} ${MAXMINDDB_CFLAGS} \
05dbc8
 		@OPENSSL_INCLUDES@
Tomas Hozza dce2d1
 
05dbc8
-CDEFINES =      @CONTRIB_DLZ@ @USE_PKCS11@
05dbc8
+CDEFINES =      @CONTRIB_DLZ@
Tomas Hozza dce2d1
 
05dbc8
 CWARNINGS =
Tomas Hozza dce2d1
 
1e4169
diff --git a/configure.ac b/configure.ac
05dbc8
index 6cce3bb..d80ae31 100644
1e4169
--- a/configure.ac
1e4169
+++ b/configure.ac
05dbc8
@@ -1276,12 +1276,14 @@ AC_SUBST(USE_GSSAPI)
Tomas Hozza 4fa997
 AC_SUBST(DST_GSSAPI_INC)
Tomas Hozza 4fa997
 AC_SUBST(DNS_GSSAPI_LIBS)
df81e8
 DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS"
Tomas Hozza 4fa997
+DNS_CRYPTO_PK11_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_PK11_LIBS"
Tomas Hozza 4fa997
 
Tomas Hozza 4fa997
 #
Tomas Hozza 4fa997
 # Applications linking with libdns also need to link with these libraries.
Tomas Hozza 4fa997
 #
Tomas Hozza 4fa997
 
Tomas Hozza 4fa997
 AC_SUBST(DNS_CRYPTO_LIBS)
Tomas Hozza 4fa997
+AC_SUBST(DNS_CRYPTO_PK11_LIBS)
Tomas Hozza 4fa997
 
Tomas Hozza 4fa997
 #
df81e8
 # was --with-lmdb specified?
05dbc8
@@ -2522,6 +2524,8 @@ AC_SUBST(BIND9_DNS_BUILDINCLUDE)
df81e8
 AC_SUBST(BIND9_NS_BUILDINCLUDE)
df81e8
 AC_SUBST(BIND9_BIND9_BUILDINCLUDE)
df81e8
 AC_SUBST(BIND9_IRS_BUILDINCLUDE)
df81e8
+AC_SUBST(BIND9_DNS_PKCS11_BUILDINCLUDE)
df81e8
+AC_SUBST(BIND9_NS_PKCS11_BUILDINCLUDE)
df81e8
 if test "X$srcdir" != "X"; then
df81e8
 	BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
df81e8
 	BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
05dbc8
@@ -2530,6 +2534,8 @@ if test "X$srcdir" != "X"; then
df81e8
 	BIND9_NS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/ns/include"
df81e8
 	BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
df81e8
 	BIND9_IRS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/irs/include"
df81e8
+	BIND9_DNS_PKCS11_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns-pkcs11/include"
df81e8
+	BIND9_NS_PKCS11_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/ns-pkcs11/include"
df81e8
 else
df81e8
 	BIND9_ISC_BUILDINCLUDE=""
df81e8
 	BIND9_ISCCC_BUILDINCLUDE=""
05dbc8
@@ -2538,6 +2544,8 @@ else
df81e8
 	BIND9_NS_BUILDINCLUDE=""
df81e8
 	BIND9_BIND9_BUILDINCLUDE=""
df81e8
 	BIND9_IRS_BUILDINCLUDE=""
df81e8
+	BIND9_DNS_PKCS11_BUILDINCLUDE=""
df81e8
+	BIND9_NS_PKCS11_BUILDINCLUDE=""
Tomas Hozza dce2d1
 fi
df81e8
 
df81e8
 AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
05dbc8
@@ -3001,8 +3009,11 @@ AC_CONFIG_FILES([
Tomas Hozza 4fa997
 	bin/delv/Makefile
Tomas Hozza dce2d1
 	bin/dig/Makefile
Tomas Hozza dce2d1
 	bin/dnssec/Makefile
df81e8
+	bin/dnssec-pkcs11/Makefile
Tomas Hozza dce2d1
 	bin/named/Makefile
Tomas Hozza 4fa997
 	bin/named/unix/Makefile
Tomas Hozza dce2d1
+	bin/named-pkcs11/Makefile
Tomas Hozza dce2d1
+	bin/named-pkcs11/unix/Makefile
Tomas Hozza dce2d1
 	bin/nsupdate/Makefile
Tomas Hozza dce2d1
 	bin/pkcs11/Makefile
df81e8
 	bin/plugins/Makefile
05dbc8
@@ -3075,6 +3086,10 @@ AC_CONFIG_FILES([
Tomas Hozza dce2d1
 	lib/dns/include/dns/Makefile
Tomas Hozza dce2d1
 	lib/dns/include/dst/Makefile
Tomas Hozza dce2d1
 	lib/dns/tests/Makefile
Tomas Hozza dce2d1
+	lib/dns-pkcs11/Makefile
Tomas Hozza dce2d1
+	lib/dns-pkcs11/include/Makefile
Tomas Hozza dce2d1
+	lib/dns-pkcs11/include/dns/Makefile
Tomas Hozza dce2d1
+	lib/dns-pkcs11/include/dst/Makefile
Tomas Hozza 4fa997
 	lib/irs/Makefile
Tomas Hozza 4fa997
 	lib/irs/include/Makefile
Tomas Hozza 4fa997
 	lib/irs/include/irs/Makefile
05dbc8
@@ -3107,6 +3122,10 @@ AC_CONFIG_FILES([
05dbc8
 	lib/ns/include/Makefile
05dbc8
 	lib/ns/include/ns/Makefile
05dbc8
 	lib/ns/tests/Makefile
05dbc8
+	lib/ns-pkcs11/Makefile
05dbc8
+	lib/ns-pkcs11/include/Makefile
05dbc8
+	lib/ns-pkcs11/include/ns/Makefile
05dbc8
+	lib/ns-pkcs11/tests/Makefile
05dbc8
 	lib/samples/Makefile
05dbc8
 	lib/samples/Makefile-postinstall
05dbc8
 	unit/unittest.sh
Tomas Hozza dce2d1
diff --git a/lib/Makefile.in b/lib/Makefile.in
05dbc8
index ffa2d5a..6fbc192 100644
Tomas Hozza dce2d1
--- a/lib/Makefile.in
Tomas Hozza dce2d1
+++ b/lib/Makefile.in
a38c25
@@ -15,7 +15,7 @@ top_srcdir =	@top_srcdir@
Tomas Hozza dce2d1
 # Attempt to disable parallel processing.
Tomas Hozza dce2d1
 .NOTPARALLEL:
Tomas Hozza dce2d1
 .NO_PARALLEL:
df81e8
-SUBDIRS =	isc isccc dns ns isccfg bind9 irs samples
05dbc8
+SUBDIRS =	isc isccc dns dns-pkcs11 ns ns-pkcs11 isccfg bind9 irs samples
Tomas Hozza dce2d1
 TARGETS =
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 @BIND9_MAKE_RULES@
Tomas Hozza dce2d1
diff --git a/lib/dns-pkcs11/Makefile.in b/lib/dns-pkcs11/Makefile.in
05dbc8
index 9125b10..593270d 100644
Tomas Hozza dce2d1
--- a/lib/dns-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/lib/dns-pkcs11/Makefile.in
05dbc8
@@ -26,11 +26,11 @@ VERSION=@BIND9_VERSION@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 USE_ISC_SPNEGO = @USE_ISC_SPNEGO@
Tomas Hozza dce2d1
 
Tomas Hozza 4fa997
-CINCLUDES =	-I. -I${top_srcdir}/lib/dns -Iinclude ${DNS_INCLUDES} \
Tomas Hozza 4fa997
+CINCLUDES =	-I. -I${top_srcdir}/lib/dns-pkcs11 -Iinclude ${DNS_PKCS11_INCLUDES} \
05dbc8
 		${ISC_INCLUDES} ${MAXMINDDB_CFLAGS} \
2dbb09
 		@OPENSSL_INCLUDES@ @DST_GSSAPI_INC@
Tomas Hozza dce2d1
 
05dbc8
-CDEFINES =	@USE_GSSAPI@ ${USE_ISC_SPNEGO} @USE_OPENSSL@ @USE_PKCS11@
05dbc8
+CDEFINES =	@USE_GSSAPI@ ${USE_ISC_SPNEGO} @USE_PKCS11@ -DUSE_OPENSSL=0
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
2dbb09
@@ -138,15 +138,15 @@ version.@O@: version.c
Tomas Hozza 4fa997
 		-DLIBAGE=${LIBAGE} \
Tomas Hozza 4fa997
 		-c ${srcdir}/version.c
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-libdns.@SA@: ${OBJS}
Tomas Hozza dce2d1
+libdns-pkcs11.@SA@: ${OBJS}
Tomas Hozza dce2d1
 	${AR} ${ARFLAGS} $@ ${OBJS}
Tomas Hozza dce2d1
 	${RANLIB} $@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-libdns.la: ${OBJS}
Tomas Hozza dce2d1
+libdns-pkcs11.la: ${OBJS}
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_LINK} \
Tomas Hozza dce2d1
-		${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libdns.la -rpath ${libdir} \
Tomas Hozza dce2d1
+		${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libdns-pkcs11.la -rpath ${libdir} \
Tomas Hozza dce2d1
 		-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
Tomas Hozza dce2d1
-		${OBJS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ ${LIBS}
Tomas Hozza dce2d1
+		${OBJS} ${ISCLIBS} @DNS_CRYPTO_PK11_LIBS@ ${LIBS}
102df2
 
79d28e
 include: gen
79d28e
 	${MAKE} include/dns/enumtype.h
05dbc8
@@ -177,22 +177,22 @@ gen: gen.c
2dbb09
 	${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c \
2dbb09
 	${BUILD_LIBS} ${LFS_LIBS}
79d28e
 
79d28e
-timestamp: include libdns.@A@
79d28e
+timestamp: include libdns-pkcs11.@A@
Tomas Hozza dce2d1
 	touch timestamp
102df2
 
79d28e
-testdirs: libdns.@A@
79d28e
+testdirs: libdns-pkcs11.@A@
79d28e
 
Tomas Hozza dce2d1
 installdirs:
Tomas Hozza dce2d1
 	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
102df2
 
Tomas Hozza dce2d1
 install:: timestamp installdirs
Tomas Hozza dce2d1
-	${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libdns.@A@ ${DESTDIR}${libdir}
Tomas Hozza dce2d1
+	${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libdns-pkcs11.@A@ ${DESTDIR}${libdir}
102df2
 
102df2
 uninstall::
102df2
-	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libdns.@A@
102df2
+	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libdns-pkcs11.@A@
102df2
 
Tomas Hozza dce2d1
 clean distclean::
Tomas Hozza dce2d1
-	rm -f libdns.@A@ timestamp
Tomas Hozza dce2d1
+	rm -f libdns-pkcs11.@A@ timestamp
Tomas Hozza dce2d1
 	rm -f gen code.h include/dns/enumtype.h include/dns/enumclass.h
Tomas Hozza dce2d1
 	rm -f include/dns/rdatastruct.h
2dbb09
 	rm -f dnstap.pb-c.c dnstap.pb-c.h
05dbc8
diff --git a/lib/dns-pkcs11/tests/Makefile.in b/lib/dns-pkcs11/tests/Makefile.in
05dbc8
index 0e91523..9351c3f 100644
05dbc8
--- a/lib/dns-pkcs11/tests/Makefile.in
05dbc8
+++ b/lib/dns-pkcs11/tests/Makefile.in
05dbc8
@@ -15,14 +15,14 @@ VERSION=@BIND9_VERSION@
05dbc8
 
05dbc8
 @BIND9_MAKE_INCLUDES@
05dbc8
 
05dbc8
-CINCLUDES =	-I. -Iinclude ${DNS_INCLUDES} ${ISC_INCLUDES} \
05dbc8
+CINCLUDES =	-I. -Iinclude ${DNS_PKCS11_INCLUDES} ${ISC_INCLUDES} \
05dbc8
 		@OPENSSL_INCLUDES@ @CMOCKA_CFLAGS@
05dbc8
-CDEFINES =	-DTESTS="\"${top_builddir}/lib/dns/tests/\""
05dbc8
+CDEFINES =	@USE_PKCS11@ -DTESTS="\"${top_builddir}/lib/dns-pkcs11/tests/\""
05dbc8
 
05dbc8
 ISCLIBS =	../../isc/libisc.@A@ @OPENSSL_LIBS@
05dbc8
 ISCDEPLIBS =	../../isc/libisc.@A@
05dbc8
-DNSLIBS =	../libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
05dbc8
-DNSDEPLIBS =	../libdns.@A@
05dbc8
+DNSLIBS =	../libdns-pkcs11.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_PK11_LIBS@
05dbc8
+DNSDEPLIBS =	../libdns-pkcs11.@A@
05dbc8
 
05dbc8
 LIBS =		@LIBS@ @CMOCKA_LIBS@
05dbc8
 
05dbc8
diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in
05dbc8
index 9125b10..70644d8 100644
05dbc8
--- a/lib/dns/Makefile.in
05dbc8
+++ b/lib/dns/Makefile.in
05dbc8
@@ -30,7 +30,7 @@ CINCLUDES =	-I. -I${top_srcdir}/lib/dns -Iinclude ${DNS_INCLUDES} \
05dbc8
 		${ISC_INCLUDES} ${MAXMINDDB_CFLAGS} \
05dbc8
 		@OPENSSL_INCLUDES@ @DST_GSSAPI_INC@
05dbc8
 
05dbc8
-CDEFINES =	@USE_GSSAPI@ ${USE_ISC_SPNEGO} @USE_OPENSSL@ @USE_PKCS11@
05dbc8
+CDEFINES =	@USE_GSSAPI@ ${USE_ISC_SPNEGO} @USE_OPENSSL@
05dbc8
 
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
05dbc8
diff --git a/lib/ns-pkcs11/Makefile.in b/lib/ns-pkcs11/Makefile.in
05dbc8
index 58d731a..47b4b98 100644
05dbc8
--- a/lib/ns-pkcs11/Makefile.in
05dbc8
+++ b/lib/ns-pkcs11/Makefile.in
05dbc8
@@ -20,8 +20,8 @@ VERSION=@BIND9_VERSION@
05dbc8
 
05dbc8
 USE_ISC_SPNEGO = @USE_ISC_SPNEGO@
05dbc8
 
05dbc8
-CINCLUDES =	-I. -I${top_srcdir}/lib/ns -Iinclude \
05dbc8
-		${NS_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \
05dbc8
+CINCLUDES =	-I. -I${top_srcdir}/lib/ns-pkcs11 -Iinclude \
05dbc8
+		${NS_PKCS11_INCLUDES} ${DNS_PKCS11_INCLUDES} ${ISC_INCLUDES} \
05dbc8
 		@OPENSSL_INCLUDES@ @DST_GSSAPI_INC@
05dbc8
 
05dbc8
 CDEFINES =	@USE_PKCS11@ -DNAMED_PLUGINDIR=\"${plugindir}\"
05dbc8
@@ -32,9 +32,9 @@ ISCLIBS =	../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
05dbc8
 
05dbc8
 ISCDEPLIBS =	../../lib/isc/libisc.@A@
05dbc8
 
05dbc8
-DNSLIBS =	../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
05dbc8
+DNSLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_PK11_LIBS@
05dbc8
 
05dbc8
-DNSDEPLIBS =	../../lib/dns/libdns.@A@
05dbc8
+DNSDEPLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@
05dbc8
 
05dbc8
 LIBS =		@LIBS@
05dbc8
 
05dbc8
@@ -66,28 +66,28 @@ version.@O@: version.c
Tomas Hozza dce2d1
 		-DLIBAGE=${LIBAGE} \
Tomas Hozza dce2d1
 		-c ${srcdir}/version.c
Tomas Hozza dce2d1
 
05dbc8
-libns.@SA@: ${OBJS}
05dbc8
+libns-pkcs11.@SA@: ${OBJS}
Tomas Hozza dce2d1
 	${AR} ${ARFLAGS} $@ ${OBJS}
Tomas Hozza dce2d1
 	${RANLIB} $@
Tomas Hozza dce2d1
 
05dbc8
-libns.la: ${OBJS}
05dbc8
+libns-pkcs11.la: ${OBJS}
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_LINK} \
05dbc8
-		${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libns.la -rpath ${libdir} \
05dbc8
+		${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libns-pkcs11.la -rpath ${libdir} \
Tomas Hozza dce2d1
 		-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
05dbc8
-		${OBJS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ ${LIBS}
05dbc8
+		${OBJS} ${ISCLIBS} @DNS_CRYPTO_PK11_LIBS@ ${LIBS}
Tomas Hozza dce2d1
 
05dbc8
-timestamp: libns.@A@
05dbc8
+timestamp: libns-pkcs11.@A@
Tomas Hozza dce2d1
 	touch timestamp
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 installdirs:
Tomas Hozza dce2d1
 	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 install:: timestamp installdirs
05dbc8
-	${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libns.@A@ \
05dbc8
+	${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libns-pkcs11.@A@ \
05dbc8
 		${DESTDIR}${libdir}
Tomas Hozza dce2d1
 
102df2
 uninstall::
05dbc8
-	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libns.@A@
05dbc8
+	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libns-pkcs11.@A@
102df2
 
Tomas Hozza dce2d1
 clean distclean::
05dbc8
-	rm -f libns.@A@ timestamp
05dbc8
+	rm -f libns-pkcs11.@A@ timestamp
05dbc8
diff --git a/lib/ns-pkcs11/tests/Makefile.in b/lib/ns-pkcs11/tests/Makefile.in
05dbc8
index ffd8f41..4a6cb1b 100644
05dbc8
--- a/lib/ns-pkcs11/tests/Makefile.in
05dbc8
+++ b/lib/ns-pkcs11/tests/Makefile.in
05dbc8
@@ -15,16 +15,16 @@ VERSION=@BIND9_VERSION@
05dbc8
 
05dbc8
 @BIND9_MAKE_INCLUDES@
05dbc8
 
05dbc8
-CINCLUDES =	-I. -Iinclude ${NS_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \
05dbc8
+CINCLUDES =	-I. -Iinclude ${NS_PKCS11_INCLUDES} ${DNS_PKCS11_INCLUDES} ${ISC_INCLUDES} \
05dbc8
 		@OPENSSL_INCLUDES@ @CMOCKA_CFLAGS@
05dbc8
-CDEFINES =	-DTESTS="\"${top_builddir}/lib/ns/tests/\"" -DNAMED_PLUGINDIR=\"${plugindir}\"
05dbc8
+CDEFINES =	@USE_PKCS11@ -DTESTS="\"${top_builddir}/lib/ns/tests/\"" -DNAMED_PLUGINDIR=\"${plugindir}\"
05dbc8
 
05dbc8
 ISCLIBS =	../../isc/libisc.@A@ @OPENSSL_LIBS@
05dbc8
 ISCDEPLIBS =	../../isc/libisc.@A@
05dbc8
-DNSLIBS =	../../dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
05dbc8
-DNSDEPLIBS =	../../dns/libdns.@A@
05dbc8
-NSLIBS =	../libns.@A@
05dbc8
-NSDEPLIBS =	../libns.@A@
05dbc8
+DNSLIBS =	../../dns-pkcs11/libdns-pkcs11.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_PK11_LIBS@
05dbc8
+DNSDEPLIBS =	../../dns-pkcs11/libdns-pkcs11.@A@
05dbc8
+NSLIBS =	../libns-pkcs11.@A@
05dbc8
+NSDEPLIBS =	../libns-pkcs11.@A@
df81e8
 
df81e8
 LIBS =		@LIBS@ @CMOCKA_LIBS@
05dbc8
 
05dbc8
diff --git a/lib/ns/Makefile.in b/lib/ns/Makefile.in
05dbc8
index 58d731a..a14728d 100644
05dbc8
--- a/lib/ns/Makefile.in
05dbc8
+++ b/lib/ns/Makefile.in
05dbc8
@@ -24,7 +24,7 @@ CINCLUDES =	-I. -I${top_srcdir}/lib/ns -Iinclude \
05dbc8
 		${NS_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \
05dbc8
 		@OPENSSL_INCLUDES@ @DST_GSSAPI_INC@
05dbc8
 
05dbc8
-CDEFINES =	@USE_PKCS11@ -DNAMED_PLUGINDIR=\"${plugindir}\"
05dbc8
+CDEFINES =	-DNAMED_PLUGINDIR=\"${plugindir}\"
05dbc8
 
05dbc8
 CWARNINGS =
05dbc8
 
Tomas Hozza dce2d1
diff --git a/make/includes.in b/make/includes.in
05dbc8
index 48cdaf7..7b17738 100644
Tomas Hozza dce2d1
--- a/make/includes.in
Tomas Hozza dce2d1
+++ b/make/includes.in
05dbc8
@@ -39,3 +39,10 @@ BIND9_INCLUDES = @BIND9_BIND9_BUILDINCLUDE@ \
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 TEST_INCLUDES = \
Tomas Hozza dce2d1
 	-I${top_srcdir}/lib/tests/include
Tomas Hozza dce2d1
+
df81e8
+DNS_PKCS11_INCLUDES = @BIND9_DNS_PKCS11_BUILDINCLUDE@ \
Tomas Hozza dce2d1
+	-I${top_srcdir}/lib/dns-pkcs11/include
df81e8
+
df81e8
+NS_PKCS11_INCLUDES = @BIND9_NS_PKCS11_BUILDINCLUDE@ \
df81e8
+	-I${top_srcdir}/lib/ns-pkcs11/include
df81e8
+