Changes between 0.9.8e and 0.9.8f-fips [xx XXX xxxx]
+ *) Modify WIN32 build system to forward references to functions implemented
+ in FIPS DLL.
+ [Steve Henson]
+
*) Move error library so that all lhash dependencies are in a separate
file. Include a simplified ERR_get_state() function for stand alone
FIPS applications. Include a initialization function OPENSSL_init()
(http://csrc.nist.gov/cryptval/) in any application requiring the use of FIPS
140-2 validated software.
-This is a OpenSSL 0.9.8-fips test version.
+This is an OpenSSL 0.9.8-fips test version.
See the file README.FIPS for details of how to build a test library.
# $ex_build_targets .= "\$(BIN_D)${o}\$(E_PREMAIN_DSO)$exep" if ($fips);
-$ex_l_libs .= " \$(L_FIPS)" if $fipsdso;
+#$ex_l_libs .= " \$(L_FIPS)" if $fipsdso;
if ($fips)
{
E_EXE=openssl
SSL=$ssl
CRYPTO=$crypto
-LIBFIPS=libfips
+LIBFIPS=libosslfips
# BIN_D - Binary output directory
# TEST_D - Binary test file output directory
$shlib, "", "");
$rules.= &do_lib_rule(
"\$(O_FIPSCANISTER)",
- "\$(O_FIPS)", "libfips",
+ "\$(O_FIPS)", "\$(LIBFIPS)",
$shlib, "\$(SO_CRYPTO)", "\$(BASEADDR)");
$rules.= &do_sdef_rule();
}
}
}
-open (IN, "ms/libeay32.def") || die "Can't Open DEF file for splittling";
+open (IN, "ms/libeay32.def") || die "Can't Open DEF file for spliting";
my $started = 0;
foreach (<IN>)
{
- if (/^\s*(\S+)\s*\@/)
+ if (/^\s*(\S+)\s*(\@\S+)\s*$/)
{
$started = 1;
if (exists $nosym{$1})
}
else
{
+ my $imptmp = sprintf " %-39s %s\n",
+ "$1=libosslfips.$1", $2;
+ push @fipsrest, $imptmp;
push @fipsdll, "\t$1\n";
}
}
# Write out DEF files for each array
-write_def("ms/libfips.def", "LIBFIPS", $preamble, \@fipsdll);
-write_def("ms/libcryptofips.def", "LIBCRYPTOFIPS", $preamble, \@fipsrest);
+write_def("ms/libosslfips.def", "LIBOSSLFIPS", $preamble, \@fipsdll);
+write_def("ms/libeayfips.def", "", $preamble, \@fipsrest);
sub write_def
my ($fnam, $defname, $preamble, $rdefs) = @_;
open (OUT, ">$fnam") || die "Can't Open DEF file $fnam for Writing\n";
- $preamble =~ s/LIBEAY32/$defname/g;
- $preamble =~ s/LIBEAY/$defname/g;
-
+ if ($defname ne "")
+ {
+ $preamble =~ s/LIBEAY32/$defname/g;
+ $preamble =~ s/LIBEAY/$defname/g;
+ }
print OUT $preamble;
foreach (@$rdefs)
{
}
else
{
- if ($fipsdso)
- {
- $crypto="libcryptofips";
- }
- else
- {
- $crypto="libeay32";
- }
+ $crypto="libeay32";
}
$o='\\';
$cp='$(PERL) util/copy.pl';
$mkdir='$(PERL) util/mkdir-p.pl';
-$rm='del';
+$rm='del /Q';
$zlib_lib="zlib1.lib";
{
$base_arg = "";
}
- if ($name ne "")
+ if ($target =~ /O_CRYPTO/ && $fipsdso)
+ {
+ $name = "/def:ms/libeayfips.def";
+ }
+ elsif ($name ne "")
{
$name =~ tr/a-z/A-Z/;
$name = "/def:ms/${name}.def";
if ($target =~ /O_SSL/)
{
$ex .= " \$(L_CRYPTO)";
- $ex .= " \$(L_FIPS)" if $fipsdso;
+ #$ex .= " \$(L_FIPS)" if $fipsdso;
}
my $fipstarget;
if ($fipsdso)
{
$ex.= $mwex unless $fipscanisterbuild;
$ret.="$target: $objs \$(PREMAIN_DSO_EXE)";
- $ret.=" ms/libfips.def" if $fipsdso;
+ $ret.=" ms/\$(LIBFIPS).def" if $fipsdso;
$ret.="\n\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.="\n\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
}
- $ret.="\tIF EXIST \$@.manifest mt -manifest \$@.manifest -outputresource:\$@;2\n\n";
+ $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n";
}
$ret.="\n";
return($ret);
$ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n";
$ret.="\t\$(APP_EX_OBJ) $files $libs\n<<\n";
}
- $ret.="\tIF EXIST \$@.manifest mt -manifest \$@.manifest -outputresource:\$@;1\n\n";
+ $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n";
return($ret);
}
sub do_sdef_rule
{
- my $ret = "ms/libfips.def: \$(O_FIPSCANISTER)\n";
+ my $ret = "ms/\$(LIBFIPS).def: \$(O_FIPSCANISTER)\n";
$ret.="\t\$(PERL) util/mksdef.pl \$(MLFLAGS) /out:dummy.dll /def:ms/libeay32.def @<<\n \$(O_FIPSCANISTER)\n<<\n";
$ret.="\n";
return $ret;