setpk11provider.pl revision ca60f7ba750a7ab5548fc1d32f78158927b0e272
#
# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# 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 $
# setpk11provider
# This script sets the PKCS#11 provider name in the build scripts.
#
# for instance: perl setpk11provider bp201w32HSM
#
if ($#ARGV != 0) {
die "Usage: perl setpk11provider <pkcs11_provider_dll_name>\n"
}
# 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");
# function to replace the provider define
sub updatefile {
my(@Lines);
$filename = $_[0];
$substr = $_[1];
close (RFILE);
# Replace the string
}
#update the file
}
close(RFILE);
}
#Update the list of files
if ($provider ne 0) {
$ind = 0;
print "Provider is $provider\n";
print "Updating file $file\n";
$ind++;
}
}