2711. [port] win32: Add the bin/pkcs11 tools into the full
build. [RT #20372]
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -113,6 +113,12 @@ nmake /nologo -f revoke.mak CFG="revoke - Win32 Release" NO_EXTERNAL_DEPS="1"
|
||||
nmake /nologo -f settime.mak CFG="settime - Win32 Release" NO_EXTERNAL_DEPS="1"
|
||||
cd ..\..
|
||||
|
||||
cd pkcs11\win32
|
||||
nmake /nologo -f pk11keygen.mak CFG="pk11keygen - Win32 Release" NO_EXTERNAL_DEPS="1"
|
||||
nmake /nologo -f pk11list.mak CFG="pk11list - Win32 Release" NO_EXTERNAL_DEPS="1"
|
||||
nmake /nologo -f pk11destroy.mak CFG="pk11destroy - Win32 Release" NO_EXTERNAL_DEPS="1"
|
||||
cd ..\..
|
||||
|
||||
rem This is the BIND 9 Installer
|
||||
|
||||
cd win32\BINDInstall
|
||||
|
||||
@@ -64,6 +64,9 @@ copy ..\bin\dnssec\dnssec-keygen.html ..\Build\Release
|
||||
copy ..\bin\dnssec\dnssec-signzone.html ..\Build\Release
|
||||
copy ..\bin\dnssec\dnssec-dsfromkey.html ..\Build\Release
|
||||
copy ..\bin\dnssec\dnssec-keyfromlabel.html ..\Build\Release
|
||||
copy ..\bin\pkcs11\pkcs11-keygen.html ..\Build\Release
|
||||
copy ..\bin\pkcs11\pkcs11-list.html ..\Build\Release
|
||||
copy ..\bin\pkcs11\pkcs11-destroy.html ..\Build\Release
|
||||
|
||||
echo Copying the migration notes.
|
||||
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: setpk11provider.pl,v 1.1 2009/10/06 22:14:13 each Exp $
|
||||
# $Id: setpk11provider.pl,v 1.2 2009/10/12 16:41:13 each Exp $
|
||||
|
||||
# setpk11provider
|
||||
# setpk11provider.pl
|
||||
# This script sets the PKCS#11 provider name in the build scripts.
|
||||
#
|
||||
# for instance: perl setpk11provider bp201w32HSM
|
||||
# for instance: setpk11provider.pl bp201w32HSM
|
||||
#
|
||||
|
||||
if ($#ARGV != 0) {
|
||||
die "Usage: perl setpk11provider <pkcs11_provider_dll_name>\n"
|
||||
die "Usage: perl setpk11provider.pl <pkcs11_provider_dll_name>\n"
|
||||
}
|
||||
|
||||
my $provider=$ARGV[0];
|
||||
@@ -31,12 +31,12 @@ my $provider=$ARGV[0];
|
||||
$provider =~ s|\.[dD][lL][lL]$||;
|
||||
|
||||
# List of files that need to be updated
|
||||
@filelist = ("../bin/pkcs11/win32/pk11keygen.mak",
|
||||
"../bin/pkcs11/win32/pk11keygen.dsp",
|
||||
"../bin/pkcs11/win32/pk11list.mak",
|
||||
"../bin/pkcs11/win32/pk11list.dsp",
|
||||
"../bin/pkcs11/win32/pk11destroy.mak",
|
||||
"../bin/pkcs11/win32/pk11destroy.dsp");
|
||||
@filelist = ("../bin/pkcs11/win32//pk11keygen.mak",
|
||||
"../bin/pkcs11/win32//pk11keygen.dsp",
|
||||
"../bin/pkcs11/win32//pk11list.mak",
|
||||
"../bin/pkcs11/win32//pk11list.dsp",
|
||||
"../bin/pkcs11/win32//pk11destroy.mak",
|
||||
"../bin/pkcs11/win32//pk11destroy.dsp");
|
||||
|
||||
# function to replace the provider define
|
||||
sub updatefile {
|
||||
@@ -62,6 +62,33 @@ sub updatefile {
|
||||
close(RFILE);
|
||||
}
|
||||
|
||||
# update config.h to define or undefine USE_PKCS11
|
||||
sub updateconfig {
|
||||
my($havexml, $substr, $line);
|
||||
my(@Lines);
|
||||
|
||||
$havexml = $_[0];
|
||||
|
||||
open (RFILE, "../config.h") || die "Can't open config.h";
|
||||
@Lines = <RFILE>;
|
||||
close (RFILE);
|
||||
|
||||
foreach $line (@Lines) {
|
||||
if ($havexml) {
|
||||
$line =~ s/^.*#undef USE_PKCS11.*$/define USE_PKCS11 1/;
|
||||
} else {
|
||||
$line =~ s/^#define USE_PKCS11 .*$/\/\* #undef USE_PKCS11 \*\//;
|
||||
}
|
||||
}
|
||||
|
||||
open (RFILE, ">../config.h") || die "Can't open config.h";
|
||||
print "Updating file ../config.h\n";
|
||||
foreach $line (@Lines) {
|
||||
print RFILE $line;
|
||||
}
|
||||
close(RFILE);
|
||||
}
|
||||
|
||||
#Update the list of files
|
||||
if ($provider ne 0) {
|
||||
$ind = 0;
|
||||
@@ -71,4 +98,8 @@ if ($provider ne 0) {
|
||||
updatefile($file, $provider);
|
||||
$ind++;
|
||||
}
|
||||
updateconfig(1);
|
||||
} else {
|
||||
updateconfig(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 2001, 2002 Internet Software Consortium.
|
||||
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
|
||||
|
||||
$Id: win32-build.txt,v 1.17 2009/09/24 13:03:39 fdupont Exp $
|
||||
$Id: win32-build.txt,v 1.18 2009/10/12 16:41:13 each Exp $
|
||||
|
||||
BIND 9.7 for Win32 Source Build Instructions. 02-Jul-2009
|
||||
|
||||
@@ -66,6 +66,12 @@ to see if the build instructions have changed:
|
||||
ms\do_masm
|
||||
nmake /f ms\ntdll.mak
|
||||
|
||||
If you wish to use PKCS #11 to control a cryptographic hardware service
|
||||
module, please see bind9\README.pkcs11. You will need to apply the patch
|
||||
in bind9\bin\pkcs11\openssl-0.9.8k-patch (this can be done using the Cygwin
|
||||
'patch' utility) and add --pk11-libname and --pk11-flavor to the Configure
|
||||
command above.
|
||||
|
||||
Step 2: Download and build libxml2
|
||||
|
||||
Download and untar the libxml2 sources from ftp://xmlsoft.org/libxml2.
|
||||
@@ -88,6 +94,11 @@ From the command prompt cd to the win32utils directory under
|
||||
the BIND9 root:
|
||||
|
||||
cd bind-9.7.0\win32utils
|
||||
|
||||
If you wish to use PKCS #11 to control a cryptographic hardware service
|
||||
module, set the path to the PKCS #11 provider library:
|
||||
|
||||
perl setpk11provider.pl <DLL path>
|
||||
|
||||
If using VC++ 6.0, run the BuildAll.bat file:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user