aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <[email protected]>2006-02-06 00:49:07 +0100
committerDr. Stephen Henson <[email protected]>2006-02-06 00:49:07 +0100
commit7f3a22803ca46727c0cd25ed309ce93e1c46bf0f (patch)
treea5293a1cc45cf4b892c66e4dbef089a614a17e3f
parentUse correct fips_premain_dso.exe path. (diff)
downloadopenssl-7f3a22803ca46727c0cd25ed309ce93e1c46bf0f.tar.gz
openssl-7f3a22803ca46727c0cd25ed309ce93e1c46bf0f.zip
Update VC++ build for new FIPS paths.
-rw-r--r--util/fipslink.pl16
-rwxr-xr-xutil/mk1mf.pl21
-rw-r--r--util/pl/VC-32.pl16
3 files changed, 27 insertions, 26 deletions
diff --git a/util/fipslink.pl b/util/fipslink.pl
index 5b9466984ee..a893833c5c7 100644
--- a/util/fipslink.pl
+++ b/util/fipslink.pl
@@ -12,23 +12,23 @@ sub check_env
}
-my ($fips_cc,$fips_cc_args, $fips_link,$fips_target, $fips_libdir)
+my ($fips_cc,$fips_cc_args, $fips_link,$fips_target, $fips_libdir, $sha1_exe)
= check_env("FIPS_CC", "FIPS_CC_ARGS", "FIPS_LINK", "FIPS_TARGET",
- "FIPS_LIBDIR");
+ "FIPSLIB_D", "FIPS_SHA1_EXE");
-if (exists $ENV{"FIPS_PREMAIN_DSO"})
+if (exists $ENV{"PREMAIN_DSO_EXE"})
{
- $fips_premain_dso = $ENV{"FIPS_PREMAIN_DSO"};
+ $fips_premain_dso = $ENV{"PREMAIN_DSO_EXE"};
}
else
{
$fips_premain_dso = "";
}
-check_hash("fips_premain.c");
-check_hash("fipscanister.o");
+check_hash($sha1_exe, "fips_premain.c");
+check_hash($sha1_exe, "fipscanister.o");
print "Integrity check OK\n";
@@ -59,13 +59,13 @@ die "Second stage Link failure" if $? != 0;
sub check_hash
{
- my ($filename) = @_;
+ my ($sha1_exe, $filename) = @_;
my ($hashfile, $hashval);
open(IN, "${fips_libdir}/${filename}.sha1") || die "Cannot open file hash file ${fips_libdir}/${filename}.sha1";
$hashfile = <IN>;
close IN;
- $hashval = `${fips_libdir}/fips_standalone_sha1.exe ${fips_libdir}/$filename`;
+ $hashval = `$sha1_exe ${fips_libdir}/$filename`;
chomp $hashfile;
chomp $hashval;
$hashfile =~ s/^.*=\s+//;
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index ff1dadf9e7f..2f1cb5d42b1 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -377,7 +377,7 @@ if ($fips_premain_c_path eq "")
if ($fips_sha1_exe_path eq "")
{
$fips_sha1_exe_path =
- "fips-1.0${o}sha${o}fips_sha1_standalone$exep";
+ "fips-1.0${o}sha${o}fips_standalone_sha1$exep";
}
if ($fips_premain_dso_exe_path eq "")
@@ -499,14 +499,6 @@ MLFLAGS=$mlflags
ASM=$bin_dir$asm
MKCANISTER=$mkcanister
-######################################################
-# You should not need to touch anything below this point
-######################################################
-
-E_EXE=openssl
-SSL=$ssl
-CRYPTO=$crypto
-
# FIPS validated module and support file locations
E_PREMAIN_DSO=fips_premain_dso
@@ -517,6 +509,14 @@ O_FIPSCANISTER=$fips_canister_path
FIPS_SHA1_EXE=$fips_sha1_exe_path
PREMAIN_DSO_EXE=$fips_premain_dso_exe_path
+######################################################
+# You should not need to touch anything below this point
+######################################################
+
+E_EXE=openssl
+SSL=$ssl
+CRYPTO=$crypto
+
# BIN_D - Binary output directory
# TEST_D - Binary test file output directory
# LIB_D - library output directory
@@ -764,8 +764,7 @@ if ($fips)
{
$rules.= &do_lib_rule("\$(CRYPTOOBJ) \$(O_FIPSCANISTER)",
"\$(O_CRYPTO)",$crypto,$shlib, "\$(SO_CRYPTO)",
- "0xFB00000", "\$(PREMAIN_DSO_EXE)",
- "\$(FIPS_PREMAIN_SRC)");
+ "0xFB00000");
}
else
{
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
index 74dd690a90f..37187061e17 100644
--- a/util/pl/VC-32.pl
+++ b/util/pl/VC-32.pl
@@ -113,7 +113,7 @@ $cflags.=" /Fd$out_def";
sub do_lib_rule
{
- local($objs,$target,$name,$shlib,$ign,$base_addr, $fips_get_sig, $fips_premain_src)=@_;
+ local($objs,$target,$name,$shlib,$ign,$base_addr) = @_;
local($ret,$Name);
$taget =~ s/\//$o/g if $o ne '/';
@@ -143,16 +143,17 @@ sub do_lib_rule
local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':'';
$ex.=' wsock32.lib gdi32.lib advapi32.lib user32.lib';
$ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/;
- $ex.=" ms${o}_chkstk.o" if $fips && $target =~ /O_CRYPTO/;
- if (defined $fips_get_sig)
+ if ($fips && $target =~ /O_CRYPTO/)
{
+ $ex.=" ms${o}_chkstk.o";
$ret.="$target: $objs $fips_get_sig\n";
$ret.="\tSET FIPS_LINK=\$(LINK)\n";
$ret.="\tSET FIPS_CC=\$(CC)\n";
$ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
- $ret.="\tSET FIPS_PREMAIN_DSO=$fips_get_sig\n";
+ $ret.="\tSET PREMAIN_DSO_EXE=\$(PREMAIN_DSO_EXE)\n";
+ $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
$ret.="\tSET FIPS_TARGET=$target\n";
- $ret.="\tSET FIPS_LIBDIR=\$(FIPSLIB_D)\n";
+ $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
$ret.="\t\$(FIPSLINK) \$(MLFLAGS) $base_arg $efile$target ";
$ret.="/def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs ";
$ret.="\$(OBJ_D)${o}fips_premain.obj $ex\n<<\n";
@@ -184,9 +185,10 @@ sub do_link_rule
$ret.="\tSET FIPS_LINK=\$(LINK)\n";
$ret.="\tSET FIPS_CC=\$(CC)\n";
$ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
- $ret.="\tSET FIPS_PREMAIN_DSO=\n";
+ $ret.="\tSET PREMAIN_DSO_EXE=\n";
$ret.="\tSET FIPS_TARGET=$target\n";
- $ret.="\tSET FIPS_LIBDIR=\$(FIPSLIB_D)\n";
+ $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
+ $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
$ret.=" \$(FIPSLINK) \$(LFLAGS) $efile$target @<<\n";
$ret.=" \$(APP_EX_OBJ) $files \$(OBJ_D)${o}fips_premain.obj $libs\n<<\n";
}