Tomas Hozza dce2d1
diff --git a/bin/Makefile.in b/bin/Makefile.in
01c5de
index a18b222..26a7e4e 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
01c5de
index 390aa0c..e59a118 100644
Tomas Hozza dce2d1
--- a/bin/dnssec-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/dnssec-pkcs11/Makefile.in
371a1e
@@ -15,18 +15,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
 
d0d728
-CDEFINES =	-DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
Tomas Hozza dce2d1
-		@CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
d0d728
+CDEFINES =	-DVERSION=\"${VERSION}\" @PKCS11_ENGINE@ \
Tomas Hozza dce2d1
+		@CRYPTO_PK11@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
371a1e
-DNSLIBS =	../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
Tomas Hozza dce2d1
-ISCLIBS =	../../lib/isc/libisc.@A@
Tomas Hozza dce2d1
-ISCNOSYMLIBS =	../../lib/isc/libisc-nosymtbl.@A@
371a1e
+DNSLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@ ${MAXMINDDB_LIBS} @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
 
371a1e
@@ -35,10 +35,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
 
371a1e
@@ -59,15 +59,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
 
371a1e
@@ -75,7 +75,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
 
371a1e
@@ -83,19 +83,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
 
371a1e
@@ -106,16 +106,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
01c5de
index 390aa0c..851a008 100644
Tomas Hozza dce2d1
--- a/bin/dnssec/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/dnssec/Makefile.in
371a1e
@@ -17,7 +17,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
01c5de
index 7a490fa..1f56836 100644
Tomas Hozza dce2d1
--- a/bin/named-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/named-pkcs11/Makefile.in
841d88
@@ -43,27 +43,27 @@ 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} \
371a1e
+		${LWRES_INCLUDES} ${DNS_PKCS11_INCLUDES} ${BIND9_INCLUDES} \
371a1e
+		${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_PKCS11_INCLUDES} \
371a1e
 		${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} ${MAXMINDDB_CFLAGS} \
371a1e
 		@DST_OPENSSL_INC@
Tomas Hozza dce2d1
 
841d88
-CDEFINES =      @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @USE_GSSAPI@ @CRYPTO@
841d88
+CDEFINES =      @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO_PK11@ @USE_GSSAPI@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 CWARNINGS =
Tomas Hozza dce2d1
 
841d88
-DNSLIBS =	../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
371a1e
+DNSLIBS =	../../lib/dns-pkcs11/libdns-pkcs11.@A@ ${MAXMINDDB_LIBS} @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@
371a1e
-ISCNOSYMLIBS =	../../lib/isc/libisc-nosymtbl.@A@
371a1e
+ISCLIBS =	../../lib/isc-pkcs11/libisc-pkcs11.@A@
371a1e
+ISCNOSYMLIBS =	../../lib/isc-pkcs11/libisc-pkcs11-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@
371a1e
+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@
371a1e
+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
 
841d88
@@ -72,15 +72,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@
d0d728
+		@LIBS@
Tomas Hozza dce2d1
 
Tomas Hozza dce2d1
 SUBDIRS =	unix
Tomas Hozza dce2d1
 
d0d728
-TARGETS =	named@EXEEXT@ lwresd@EXEEXT@ feature-test@EXEEXT@
d0d728
+TARGETS =	named-pkcs11@EXEEXT@ feature-test-pkcs11@EXEEXT@
Tomas Hozza dce2d1
 
Tomas Hozza 4fa997
 GEOIPLINKOBJS = geoip.@O@
371a1e
 GEOIP2LINKOBJS = geoip.@O@
841d88
@@ -94,8 +94,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
 
841d88
@@ -113,8 +112,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
 
841d88
@@ -154,21 +152,21 @@ 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
 
d0d728
 # Bit of hack, do not produce intermediate .o object for featuretest
d0d728
 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
 
841d88
@@ -201,16 +199,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
01c5de
index 7a490fa..3d8655f 100644
Tomas Hozza dce2d1
--- a/bin/named/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/named/Makefile.in
371a1e
@@ -48,7 +48,7 @@ CINCLUDES =	-I${srcdir}/include -I${srcdir}/unix/include -I. \
371a1e
 		${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} ${MAXMINDDB_CFLAGS} \
371a1e
 		@DST_OPENSSL_INC@
Tomas Hozza dce2d1
 
841d88
-CDEFINES =      @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @USE_GSSAPI@ @CRYPTO@
841d88
+CDEFINES =      @CONTRIB_DLZ@ @USE_GSSAPI@ @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
01c5de
index 2c19e7e..8223d5e 100644
Tomas Hozza dce2d1
--- a/bin/pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/bin/pkcs11/Makefile.in
01c5de
@@ -13,13 +13,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
 
1e4169
diff --git a/configure.ac b/configure.ac
01c5de
index c6715b4..8144268 100644
1e4169
--- a/configure.ac
1e4169
+++ b/configure.ac
01c5de
@@ -1176,12 +1176,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?
01c5de
@@ -1554,12 +1556,12 @@ AC_ARG_ENABLE(openssl-hash,
Michal Ruprich d886cd
 AC_MSG_CHECKING(for OpenSSL library)
Michal Ruprich d886cd
 OPENSSL_WARNING=
371a1e
 openssldirs="/usr /usr/local /usr/local/ssl /opt/local /usr/pkg /usr/sfw"
102df2
-if test "yes" = "$want_native_pkcs11"
Michal Ruprich d886cd
-then
Michal Ruprich d886cd
-	use_openssl="native_pkcs11"
01c5de
-	want_openssl_hash="no"
Michal Ruprich d886cd
-	AC_MSG_RESULT(use of native PKCS11 instead)
Michal Ruprich d886cd
-fi
01c5de
+#if test "yes" = "$want_native_pkcs11"
01c5de
+#then
01c5de
+#	use_openssl="native_pkcs11"
01c5de
+#	want_openssl_hash="no"
01c5de
+#	AC_MSG_RESULT(use of native PKCS11 instead)
01c5de
+#fi
Michal Ruprich d886cd
 
102df2
 if test "auto" = "$use_openssl"
Tomas Hozza dce2d1
 then
01c5de
@@ -1572,6 +1574,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=""
01c5de
@@ -1593,11 +1596,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=""
01c5de
@@ -1607,7 +1609,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=""
01c5de
@@ -1639,7 +1643,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.])
01c5de
@@ -2067,6 +2071,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"
01c5de
@@ -2353,6 +2358,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)
01c5de
@@ -5501,8 +5507,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
01c5de
@@ -5575,6 +5584,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
01c5de
@@ -5599,6 +5612,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
01c5de
index f089bea..3ed939b 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
01c5de
index 8fc4e94..5eefb14 100644
Tomas Hozza dce2d1
--- a/lib/dns-pkcs11/Makefile.in
Tomas Hozza dce2d1
+++ b/lib/dns-pkcs11/Makefile.in
371a1e
@@ -26,17 +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} \
371a1e
-		${ISC_INCLUDES} ${MAXMINDDB_CFLAGS} \
371a1e
-		@DST_OPENSSL_INC@ @DST_GSSAPI_INC@
Tomas Hozza 4fa997
+CINCLUDES =	-I. -I${top_srcdir}/lib/dns-pkcs11 -Iinclude ${DNS_PKCS11_INCLUDES} \
371a1e
+		${ISC_PKCS11_INCLUDES} ${MAXMINDDB_CFLAGS} @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
 
371a1e
 LIBS =		${MAXMINDDB_LIBS} @LIBS@
Tomas Hozza dce2d1
 
371a1e
@@ -150,15 +149,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
371a1e
@@ -189,22 +188,22 @@ gen: gen.c
16ecf0
 	${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c \
16ecf0
 	${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
2a4663
 	rm -f dnstap.pb-c.c dnstap.pb-c.h
Tomas Hozza dce2d1
diff --git a/lib/isc-pkcs11/Makefile.in b/lib/isc-pkcs11/Makefile.in
01c5de
index 7e3e9ce..58d7466 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
01c5de
@@ -107,40 +107,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
01c5de
index 66efe68..966671f 100644
Tomas Hozza dce2d1
--- a/make/includes.in
Tomas Hozza dce2d1
+++ b/make/includes.in
01c5de
@@ -41,3 +41,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