Tomas Hozza dce2d1
diff --git a/bin/Makefile.in b/bin/Makefile.in
a38c25
index f0c504a..ce7a2da 100644
Tomas Hozza dce2d1
--- a/bin/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/Makefile.in
a38c25
@@ -11,8 +11,8 @@ 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 \
a38c25
-		@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
a38c25
+SUBDIRS =	named named-pkcs11 rndc dig delv dnssec dnssec-pkcs11 tools nsupdate \
a38c25
+		check confgen @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
Tomas Hozza dce2d1
 TARGETS =
Tomas Hozza dce2d1
 
a38c25
 @BIND9_MAKE_RULES@
Tomas Hozza dce2d1
diff --git a/bin/dnssec-pkcs11/Makefile.in b/bin/dnssec-pkcs11/Makefile.in
ad7b3b
index ce0a177..f8370cf 100644
Tomas Hozza dce2d1
--- a/bin/dnssec-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/dnssec-pkcs11/Makefile.in
a38c25
@@ -17,18 +17,18 @@ VERSION=@BIND9_VERSION@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 @BIND9_MAKE_INCLUDES@
Tomas Hozza dce2d1
 
102df2
-CINCLUDES =	${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
Tomas Hozza dce2d1
+CINCLUDES =	${DNS_PKCS11_INCLUDES} ${ISC_PKCS11_INCLUDES}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CDEFINES =	-DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
Tomas Hozza dce2d1
-		@CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
Tomas Hozza dce2d1
+		@CRYPTO_PK11@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-DNSLIBS =	../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
Tomas Hozza dce2d1
-ISCLIBS =	../../lib/isc/libisc.@A@
Tomas Hozza dce2d1
-ISCNOSYMLIBS =	../../lib/isc/libisc-nosymtbl.@A@
Tomas Hozza 4fa997
+DNSLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@ @DNS_CRYPTO_LIBS@
Tomas Hozza dce2d1
+ISCLIBS =	../../lib/isc-pkcs11/libisc-pkcs11.@A@
Tomas Hozza dce2d1
+ISCNOSYMLIBS =	../../lib/isc-pkcs11/libisc-pkcs11-nosymtbl.@A@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-DNSDEPLIBS =	../../lib/dns/libdns.@A@
Tomas Hozza dce2d1
-ISCDEPLIBS =	../../lib/isc/libisc.@A@
Tomas Hozza dce2d1
+DNSDEPLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@
Tomas Hozza dce2d1
+ISCDEPLIBS =	../../lib/isc-pkcs11/libisc-pkcs11.@A@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 DEPLIBS =	${DNSDEPLIBS} ${ISCDEPLIBS}
Tomas Hozza dce2d1
 
a38c25
@@ -37,10 +37,10 @@ LIBS =		${DNSLIBS} ${ISCLIBS} @LIBS@
Tomas Hozza dce2d1
 NOSYMLIBS =	${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 # Alphabetically
Tomas Hozza dce2d1
-TARGETS =	dnssec-keygen@EXEEXT@ dnssec-signzone@EXEEXT@ \
Tomas Hozza dce2d1
-		dnssec-keyfromlabel@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \
Tomas Hozza dce2d1
-		dnssec-revoke@EXEEXT@ dnssec-settime@EXEEXT@ \
Tomas Hozza dce2d1
-		dnssec-verify@EXEEXT@ dnssec-importkey@EXEEXT@
Tomas Hozza dce2d1
+TARGETS =	dnssec-keygen-pkcs11@EXEEXT@ dnssec-signzone-pkcs11@EXEEXT@ \
Tomas Hozza dce2d1
+		dnssec-keyfromlabel-pkcs11@EXEEXT@ dnssec-dsfromkey-pkcs11@EXEEXT@ \
Tomas Hozza dce2d1
+		dnssec-revoke-pkcs11@EXEEXT@ dnssec-settime-pkcs11@EXEEXT@ \
Tomas Hozza dce2d1
+		dnssec-verify-pkcs11@EXEEXT@ dnssec-importkey-pkcs11@EXEEXT@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 OBJS =		dnssectool.@O@
Tomas Hozza dce2d1
 
a38c25
@@ -61,15 +61,15 @@ MANOBJS =	${MANPAGES} ${HTMLPAGES}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 @BIND9_MAKE_RULES@
Tomas Hozza dce2d1
 
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
 
a38c25
@@ -77,7 +77,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
 
a38c25
@@ -85,19 +85,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
 
20ccb8
@@ -108,16 +108,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::
Tomas Hozza dce2d1
diff --git a/bin/dnssec/Makefile.in b/bin/dnssec/Makefile.in
ad7b3b
index ce0a177..7cede84 100644
Tomas Hozza dce2d1
--- a/bin/dnssec/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/dnssec/Makefile.in
a38c25
@@ -19,7 +19,7 @@ VERSION=@BIND9_VERSION@
Tomas Hozza dce2d1
 
102df2
 CINCLUDES =	${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-CDEFINES =	-DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
Tomas Hozza dce2d1
+CDEFINES =	-DVERSION=\"${VERSION}\" \
Tomas Hozza dce2d1
 		@CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
diff --git a/bin/named-pkcs11/Makefile.in b/bin/named-pkcs11/Makefile.in
20ccb8
index d92bc9a..a8c42a4 100644
Tomas Hozza dce2d1
--- a/bin/named-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/named-pkcs11/Makefile.in
a38c25
@@ -43,26 +43,26 @@ 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. \
Tomas Hozza dce2d1
-		${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
Tomas Hozza dce2d1
-		${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
Michal Ruprich d886cd
+        ${LWRES_INCLUDES} ${DNS_PKCS11_INCLUDES} ${BIND9_INCLUDES} \
Michal Ruprich d886cd
+        ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_PKCS11_INCLUDES} \
Tomas Hozza dce2d1
 		${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-CDEFINES =      @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO@
Tomas Hozza dce2d1
+CDEFINES =      @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO_PK11@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-DNSLIBS =	../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
Michal Ruprich d886cd
+DNSLIBS =  ../../lib/dns-pkcs11/libdns-pkcs11.@A@ @DNS_CRYPTO_LIBS@
Tomas Hozza dce2d1
 ISCCFGLIBS =	../../lib/isccfg/libisccfg.@A@
Tomas Hozza dce2d1
 ISCCCLIBS =	../../lib/isccc/libisccc.@A@
Tomas Hozza dce2d1
-ISCLIBS =	../../lib/isc/libisc.@A@
Michal Ruprich d886cd
+ISCLIBS =  ../../lib/isc-pkcs11/libisc-pkcs11.@A@
Tomas Hozza dce2d1
 ISCNOSYMLIBS =	../../lib/isc/libisc-nosymtbl.@A@
Tomas Hozza dce2d1
 LWRESLIBS =	../../lib/lwres/liblwres.@A@
Tomas Hozza dce2d1
 BIND9LIBS =	../../lib/bind9/libbind9.@A@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-DNSDEPLIBS =	../../lib/dns/libdns.@A@
Michal Ruprich d886cd
+DNSDEPLIBS =   ../../lib/dns-pkcs11/libdns-pkcs11.@A@
Tomas Hozza dce2d1
 ISCCFGDEPLIBS =	../../lib/isccfg/libisccfg.@A@
Tomas Hozza dce2d1
 ISCCCDEPLIBS =	../../lib/isccc/libisccc.@A@
Tomas Hozza dce2d1
-ISCDEPLIBS =	../../lib/isc/libisc.@A@
Michal Ruprich d886cd
+ISCDEPLIBS =   ../../lib/isc-pkcs11/libisc-pkcs11.@A@
Tomas Hozza dce2d1
 LWRESDEPLIBS =	../../lib/lwres/liblwres.@A@
Tomas Hozza dce2d1
 BIND9DEPLIBS =	../../lib/bind9/libbind9.@A@
Tomas Hozza dce2d1
 
a38c25
@@ -71,15 +71,15 @@ DEPLIBS =	${LWRESDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 LIBS =		${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
Tomas Hozza dce2d1
 		${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \
Tomas Hozza dce2d1
-		${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
Tomas Hozza dce2d1
+		@LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 NOSYMLIBS =	${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
Tomas Hozza dce2d1
 		${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
Tomas Hozza dce2d1
-		${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
Michal Ruprich d886cd
+        @LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 SUBDIRS =	unix
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-TARGETS =	named@EXEEXT@ lwresd@EXEEXT@
Michal Ruprich d886cd
+TARGETS =  named-pkcs11@EXEEXT@
Tomas Hozza dce2d1
 
Tomas Hozza 4fa997
 GEOIPLINKOBJS = geoip.@O@
102df2
 
a38c25
@@ -90,8 +90,7 @@ OBJS =		builtin.@O@ client.@O@ config.@O@ control.@O@ \
Tomas Hozza dce2d1
 		tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \
Tomas Hozza dce2d1
 		zoneconf.@O@ \
Tomas Hozza dce2d1
 		lwaddr.@O@ lwresd.@O@ lwdclient.@O@ lwderror.@O@ lwdgabn.@O@ \
Tomas Hozza dce2d1
-		lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@ \
Tomas Hozza dce2d1
-		${DLZDRIVER_OBJS} ${DBDRIVER_OBJS}
Michal Ruprich d886cd
+        lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 UOBJS =		unix/os.@O@ unix/dlz_dlopen_driver.@O@
Tomas Hozza dce2d1
 
a38c25
@@ -106,8 +105,7 @@ SRCS =		builtin.c client.c config.c control.c \
Tomas Hozza dce2d1
 		tkeyconf.c tsigconf.c update.c xfrout.c \
Tomas Hozza dce2d1
 		zoneconf.c \
Tomas Hozza dce2d1
 		lwaddr.c lwresd.c lwdclient.c lwderror.c lwdgabn.c \
Tomas Hozza dce2d1
-		lwdgnba.c lwdgrbn.c lwdnoop.c lwsearch.c \
Tomas Hozza dce2d1
-		${DLZDRIVER_SRCS} ${DBDRIVER_SRCS}
Michal Ruprich d886cd
+        lwdgnba.c lwdgrbn.c lwdnoop.c lwsearch.c
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 MANPAGES =	named.8 lwresd.8 named.conf.5
Tomas Hozza dce2d1
 
a38c25
@@ -146,14 +144,14 @@ 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}
cb2172
 
cb2172
-lwresd@EXEEXT@: named@EXEEXT@
cb2172
+lwresd@EXEEXT@: named-pkcs11@EXEEXT@
cb2172
 	rm -f lwresd@EXEEXT@
cb2172
-	@LN@ named@EXEEXT@ lwresd@EXEEXT@
cb2172
+	@LN@ named-pkcs11@EXEEXT@ lwresd@EXEEXT@
cb2172
 
cb2172
 doc man:: ${MANOBJS}
cb2172
 
20ccb8
@@ -184,16 +182,11 @@ install-man8: named.8 lwresd.8
Tomas Hozza dce2d1
 
20ccb8
 install-man: install-man5 install-man8
Michal Ruprich d886cd
 
20ccb8
-install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs install-man
Tomas Hozza dce2d1
-	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
Tomas Hozza dce2d1
-	(cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@)
Tomas Hozza dce2d1
+install:: named-pkcs11@EXEEXT@ installdirs
Tomas Hozza dce2d1
+	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-pkcs11@EXEEXT@ ${DESTDIR}${sbindir}
Tomas Hozza dce2d1
 
102df2
 uninstall::
102df2
-	rm -f ${DESTDIR}${mandir}/man5/named.conf.5
102df2
-	rm -f ${DESTDIR}${mandir}/man8/lwresd.8
102df2
-	rm -f ${DESTDIR}${mandir}/man8/named.8
102df2
-	rm -f ${DESTDIR}${sbindir}/lwresd@EXEEXT@
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
 
Tomas Hozza dce2d1
diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in
20ccb8
index d92bc9a..6d2bfd1 100644
Tomas Hozza dce2d1
--- a/bin/named/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/named/Makefile.in
a38c25
@@ -47,7 +47,7 @@ CINCLUDES =	-I${srcdir}/include -I${srcdir}/unix/include -I. \
Tomas Hozza dce2d1
 		${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
Tomas Hozza dce2d1
 		${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-CDEFINES =      @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO@
Tomas Hozza dce2d1
+CDEFINES =      @CONTRIB_DLZ@ @CRYPTO@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
diff --git a/bin/pkcs11/Makefile.in b/bin/pkcs11/Makefile.in
6e9104
index a058c91..d4b689a 100644
Tomas Hozza dce2d1
--- a/bin/pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/pkcs11/Makefile.in
a38c25
@@ -15,13 +15,13 @@ top_srcdir =	@top_srcdir@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 @BIND9_MAKE_INCLUDES@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-CINCLUDES =	${ISC_INCLUDES}
Tomas Hozza dce2d1
+CINCLUDES =	${ISC_PKCS11_INCLUDES}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CDEFINES =
Tomas Hozza dce2d1
 
Tomas Hozza 4fa997
-ISCLIBS =	../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
Tomas Hozza 4fa997
+ISCLIBS =	../../lib/isc-pkcs11/libisc-pkcs11.@A@ @ISC_OPENSSL_LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-ISCDEPLIBS =	../../lib/isc/libisc.@A@
Tomas Hozza dce2d1
+ISCDEPLIBS =	../../lib/isc-pkcs11/libisc-pkcs11.@A@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 DEPLIBS =	${ISCDEPLIBS}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
diff --git a/configure.in b/configure.in
ad7b3b
index 898b4ac..1edafd1 100644
Tomas Hozza dce2d1
--- a/configure.in
Tomas Hozza dce2d1
+++ b/configure.in
ad7b3b
@@ -1109,12 +1109,14 @@ AC_SUBST(USE_GSSAPI)
Tomas Hozza 4fa997
 AC_SUBST(DST_GSSAPI_INC)
Tomas Hozza 4fa997
 AC_SUBST(DNS_GSSAPI_LIBS)
Tomas Hozza 4fa997
 DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_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
 #
Tomas Hozza 4fa997
 # was --with-randomdev specified?
ad7b3b
@@ -1499,11 +1501,11 @@ fi
Michal Ruprich d886cd
 AC_MSG_CHECKING(for OpenSSL library)
Michal Ruprich d886cd
 OPENSSL_WARNING=
Tomas Hozza dce2d1
 openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
102df2
-if test "yes" = "$want_native_pkcs11"
Michal Ruprich d886cd
-then
Michal Ruprich d886cd
-	use_openssl="native_pkcs11"
Michal Ruprich d886cd
-	AC_MSG_RESULT(use of native PKCS11 instead)
Michal Ruprich d886cd
-fi
102df2
+# if test "yes" = "$want_native_pkcs11"
102df2
+# then
102df2
+# 	use_openssl="native_pkcs11"
102df2
+# 	AC_MSG_RESULT(use of native PKCS11 instead)
102df2
+# fi
Michal Ruprich d886cd
 
102df2
 if test "auto" = "$use_openssl"
Tomas Hozza dce2d1
 then
ad7b3b
@@ -1516,6 +1518,7 @@ then
Michal Ruprich d886cd
 		fi
Michal Ruprich d886cd
 	done
Tomas Hozza dce2d1
 fi
Tomas Hozza 4fa997
+CRYPTO_PK11=""
Tomas Hozza dce2d1
 OPENSSL_ECDSA=""
Tomas Hozza dce2d1
 OPENSSL_GOST=""
cb2172
 OPENSSL_ED25519=""
ad7b3b
@@ -1537,11 +1540,10 @@ case "$with_gost" in
Tomas Hozza 4fa997
 		;;
Tomas Hozza 4fa997
 esac
Tomas Hozza 4fa997
 
Tomas Hozza 4fa997
-case "$use_openssl" in
Tomas Hozza 4fa997
-	native_pkcs11)
Tomas Hozza 4fa997
-		AC_MSG_RESULT(disabled because of native PKCS11)
Tomas Hozza 4fa997
+if test "$want_native_pkcs11" = "yes"
Tomas Hozza 4fa997
+then
Tomas Hozza 4fa997
 		DST_OPENSSL_INC=""
Tomas Hozza 4fa997
-		CRYPTO="-DPKCS11CRYPTO"
Tomas Hozza 4fa997
+		CRYPTO_PK11="-DPKCS11CRYPTO"
6e9104
 		CRYPTOLIB="pkcs11"
cb2172
 		OPENSSLECDSALINKOBJS=""
cb2172
 		OPENSSLECDSALINKSRCS=""
ad7b3b
@@ -1551,7 +1553,9 @@ case "$use_openssl" in
cb2172
 		OPENSSLGOSTLINKSRCS=""
Tomas Hozza 4fa997
 		OPENSSLLINKOBJS=""
Tomas Hozza 4fa997
 		OPENSSLLINKSRCS=""
Tomas Hozza 4fa997
-		;;
Tomas Hozza 4fa997
+fi
Tomas Hozza 4fa997
+
Tomas Hozza 4fa997
+case "$use_openssl" in
Tomas Hozza 4fa997
 	no)
Tomas Hozza 4fa997
 		AC_MSG_RESULT(no)
Tomas Hozza 4fa997
 		DST_OPENSSL_INC=""
ad7b3b
@@ -1583,7 +1587,7 @@ case "$use_openssl" in
6e9104
 If you do not want OpenSSL, use --without-openssl])
Tomas Hozza dce2d1
 		;;
Tomas Hozza dce2d1
 	*)
102df2
-		if test "yes" = "$want_native_pkcs11"
6e9104
+		if false # test "yes" = "$want_native_pkcs11"
Tomas Hozza dce2d1
 		then
6e9104
 			AC_MSG_RESULT()
6e9104
 			AC_MSG_ERROR([OpenSSL and native PKCS11 cannot be used together.])
ad7b3b
@@ -2011,6 +2015,7 @@ AC_SUBST(OPENSSL_ED25519)
Tomas Hozza dce2d1
 AC_SUBST(OPENSSL_GOST)
Tomas Hozza dce2d1
 
Tomas Hozza 4fa997
 DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DST_OPENSSL_LIBS"
Tomas Hozza dce2d1
+DNS_CRYPTO_PK11_LIBS="$DNS_CRYPTO_LIBS"
Tomas Hozza dce2d1
 
Tomas Hozza 4fa997
 ISC_PLATFORM_WANTAES="#undef ISC_PLATFORM_WANTAES"
102df2
 if test "yes" = "$with_aes"
ad7b3b
@@ -2329,6 +2334,7 @@ esac
Tomas Hozza dce2d1
 AC_SUBST(PKCS11LINKOBJS)
Tomas Hozza dce2d1
 AC_SUBST(PKCS11LINKSRCS)
Tomas Hozza dce2d1
 AC_SUBST(CRYPTO)
Tomas Hozza dce2d1
+AC_SUBST(CRYPTO_PK11)
Tomas Hozza dce2d1
 AC_SUBST(PKCS11_ECDSA)
Tomas Hozza dce2d1
 AC_SUBST(PKCS11_GOST)
cb2172
 AC_SUBST(PKCS11_ED25519)
ad7b3b
@@ -5401,8 +5407,11 @@ AC_CONFIG_FILES([
Tomas Hozza 4fa997
 	bin/delv/Makefile
Tomas Hozza dce2d1
 	bin/dig/Makefile
Tomas Hozza dce2d1
 	bin/dnssec/Makefile
Tomas Hozza 4fa997
+	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
Tomas Hozza 4fa997
 	bin/python/Makefile
ad7b3b
@@ -5476,6 +5485,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
ad7b3b
@@ -5500,6 +5513,24 @@ AC_CONFIG_FILES([
Tomas Hozza dce2d1
 	lib/isc/unix/include/Makefile
Tomas Hozza dce2d1
 	lib/isc/unix/include/isc/Makefile
Tomas Hozza dce2d1
 	lib/isc/unix/include/pkcs11/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/$arch/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/$arch/include/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/$arch/include/isc/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/$thread_dir/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/$thread_dir/include/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/$thread_dir/include/isc/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/include/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/include/isc/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/include/isc/platform.h
Tomas Hozza dce2d1
+	lib/isc-pkcs11/include/pk11/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/include/pkcs11/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/tests/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/nls/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/unix/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/unix/include/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/unix/include/isc/Makefile
Tomas Hozza dce2d1
+	lib/isc-pkcs11/unix/include/pkcs11/Makefile
Tomas Hozza dce2d1
 	lib/isccc/Makefile
Tomas Hozza dce2d1
 	lib/isccc/include/Makefile
Tomas Hozza dce2d1
 	lib/isccc/include/isccc/Makefile
Tomas Hozza dce2d1
diff --git a/lib/Makefile.in b/lib/Makefile.in
a38c25
index 81270a0..bcb5312 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:
a38c25
-SUBDIRS =	isc isccc dns isccfg bind9 lwres irs samples
a38c25
+SUBDIRS =	isc isc-pkcs11 isccc dns dns-pkcs11 isccfg bind9 lwres 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
a38c25
index 4a8549e..6a19906 100644
Tomas Hozza dce2d1
--- a/lib/dns-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/lib/dns-pkcs11/Makefile.in
a38c25
@@ -26,16 +26,16 @@ 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
-		${ISC_INCLUDES} @DST_OPENSSL_INC@ @DST_GSSAPI_INC@
Tomas Hozza 4fa997
+CINCLUDES =	-I. -I${top_srcdir}/lib/dns-pkcs11 -Iinclude ${DNS_PKCS11_INCLUDES} \
Tomas Hozza 4fa997
+		${ISC_PKCS11_INCLUDES} @DST_OPENSSL_INC@ @DST_GSSAPI_INC@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-CDEFINES =	-DUSE_MD5 @CRYPTO@ @USE_GSSAPI@ ${USE_ISC_SPNEGO}
Tomas Hozza dce2d1
+CDEFINES =	-DUSE_MD5 @CRYPTO_PK11@ @USE_GSSAPI@ ${USE_ISC_SPNEGO}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-ISCLIBS =	../../lib/isc/libisc.@A@
Tomas Hozza dce2d1
+ISCLIBS =	../../lib/isc-pkcs11/libisc-pkcs11.@A@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-ISCDEPLIBS =	../../lib/isc/libisc.@A@
Tomas Hozza dce2d1
+ISCDEPLIBS =	../../lib/isc-pkcs11/libisc-pkcs11.@A@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 LIBS =		@LIBS@
Tomas Hozza dce2d1
 
a38c25
@@ -146,15 +146,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
a38c25
@@ -180,25 +180,25 @@ code.h:	gen
79d28e
 	./gen -s ${srcdir} > code.h || { rm -f $@ ; exit 1; }
79d28e
 
79d28e
 gen: gen.c
79d28e
-	${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \
79d28e
+	${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc-pkcs11/include \
79d28e
 	${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_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
Michal Ruprich d886cd
 	rm -f dnstap.pb-c.c dnstap.pb-c.h include/dns/dnstap.pb-c.h
Tomas Hozza dce2d1
diff --git a/lib/isc-pkcs11/Makefile.in b/lib/isc-pkcs11/Makefile.in
ad7b3b
index 98acfff..2fd6981 100644
Tomas Hozza dce2d1
--- a/lib/isc-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/lib/isc-pkcs11/Makefile.in
a38c25
@@ -23,8 +23,8 @@ CINCLUDES =	-I${srcdir}/unix/include \
Tomas Hozza dce2d1
 		-I${srcdir}/@ISC_THREAD_DIR@/include \
Tomas Hozza dce2d1
 		-I${srcdir}/@ISC_ARCH_DIR@/include \
Tomas Hozza dce2d1
 		-I./include \
7584e5
-		-I${srcdir}/include ${DNS_INCLUDES} @ISC_OPENSSL_INC@
Tomas Hozza dce2d1
-CDEFINES =	@CRYPTO@ -DPK11_LIB_LOCATION=\"${PROVIDER}\"
Tomas Hozza dce2d1
+		-I${srcdir}/include ${DNS_PKCS11_INCLUDES}
Tomas Hozza dce2d1
+CDEFINES =	@CRYPTO_PK11@ -DPK11_LIB_LOCATION=\"${PROVIDER}\"
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 # Alphabetically
ad7b3b
@@ -103,40 +103,40 @@ version.@O@: version.c
Tomas Hozza dce2d1
 		-DLIBAGE=${LIBAGE} \
Tomas Hozza dce2d1
 		-c ${srcdir}/version.c
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-libisc.@SA@: ${OBJS} ${SYMTBLOBJS}
Tomas Hozza dce2d1
+libisc-pkcs11.@SA@: ${OBJS} ${SYMTBLOBJS}
Tomas Hozza dce2d1
 	${AR} ${ARFLAGS} $@ ${OBJS} ${SYMTBLOBJS}
Tomas Hozza dce2d1
 	${RANLIB} $@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-libisc-nosymtbl.@SA@: ${OBJS}
Tomas Hozza dce2d1
+libisc-pkcs11-nosymtbl.@SA@: ${OBJS}
Tomas Hozza dce2d1
 	${AR} ${ARFLAGS} $@ ${OBJS}
Tomas Hozza dce2d1
 	${RANLIB} $@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-libisc.la: ${OBJS} ${SYMTBLOBJS}
Tomas Hozza dce2d1
+libisc-pkcs11.la: ${OBJS} ${SYMTBLOBJS}
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_LINK} \
Tomas Hozza dce2d1
-		${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc.la -rpath ${libdir} \
Tomas Hozza dce2d1
+		${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc-pkcs11.la -rpath ${libdir} \
Tomas Hozza dce2d1
 		-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
Tomas Hozza dce2d1
 		${OBJS} ${SYMTBLOBJS} ${LIBS}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-libisc-nosymtbl.la: ${OBJS}
Tomas Hozza dce2d1
+libisc-pkcs11-nosymtbl.la: ${OBJS}
Tomas Hozza dce2d1
 	${LIBTOOL_MODE_LINK} \
Tomas Hozza dce2d1
-		${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc-nosymtbl.la -rpath ${libdir} \
Tomas Hozza dce2d1
+		${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc-pkcs11-nosymtbl.la -rpath ${libdir} \
Tomas Hozza dce2d1
 		-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
Tomas Hozza dce2d1
 		${OBJS} ${LIBS}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
-timestamp: libisc.@A@ libisc-nosymtbl.@A@
Tomas Hozza dce2d1
+timestamp: libisc-pkcs11.@A@ libisc-pkcs11-nosymtbl.@A@
Tomas Hozza dce2d1
 	touch timestamp
Tomas Hozza dce2d1
 
79d28e
-testdirs: libisc.@A@ libisc-nosymtbl.@A@
79d28e
+testdirs: libisc-pkcs11.@A@ libisc-pkcs11-nosymtbl.@A@
79d28e
 
Tomas Hozza dce2d1
 installdirs:
Tomas Hozza dce2d1
 	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 install:: timestamp installdirs
Tomas Hozza dce2d1
-	${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libisc.@A@ ${DESTDIR}${libdir}
Tomas Hozza dce2d1
+	${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libisc-pkcs11.@A@ ${DESTDIR}${libdir}
Tomas Hozza dce2d1
 
102df2
 uninstall::
102df2
-	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libisc.@A@
102df2
+	${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libisc-pkcs11.@A@
102df2
 
Tomas Hozza dce2d1
 clean distclean::
Tomas Hozza dce2d1
-	rm -f libisc.@A@ libisc-nosymtbl.@A@ libisc.la \
Tomas Hozza dce2d1
-	libisc-nosymtbl.la timestamp
Tomas Hozza dce2d1
+	rm -f libisc-pkcs11.@A@ libisc-pkcs11-nosymtbl.@A@ libisc-pkcs11.la \
Tomas Hozza dce2d1
+	libisc-pkcs11-nosymtbl.la timestamp
Tomas Hozza dce2d1
diff --git a/make/includes.in b/make/includes.in
a38c25
index fa86ad1..3cfbe9f 100644
Tomas Hozza dce2d1
--- a/make/includes.in
Tomas Hozza dce2d1
+++ b/make/includes.in
a38c25
@@ -43,3 +43,13 @@ 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
+
Tomas Hozza dce2d1
+ISC_PKCS11_INCLUDES = @BIND9_ISC_BUILDINCLUDE@ \
Tomas Hozza dce2d1
+	-I${top_srcdir}/lib/isc-pkcs11 \
Tomas Hozza dce2d1
+	-I${top_srcdir}/lib/isc-pkcs11/include \
Tomas Hozza dce2d1
+	-I${top_srcdir}/lib/isc-pkcs11/unix/include \
Tomas Hozza dce2d1
+	-I${top_srcdir}/lib/isc-pkcs11/@ISC_THREAD_DIR@/include \
Tomas Hozza dce2d1
+	-I${top_srcdir}/lib/isc-pkcs11/@ISC_ARCH_DIR@/include
Tomas Hozza dce2d1
+
Tomas Hozza dce2d1
+DNS_PKCS11_INCLUDES = @BIND9_DNS_BUILDINCLUDE@ \
Tomas Hozza dce2d1
+	-I${top_srcdir}/lib/dns-pkcs11/include