From: Dr. Stephen Henson Date: Mon, 24 Apr 2006 13:32:58 +0000 (+0000) Subject: Add new --with-baseaddr command line option to allow the FIPS base address of X-Git-Tag: OpenSSL_0_9_7j~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=234f2f67acbcd8b1becff3a0e38da5bc9db45677;p=oweals%2Fopenssl.git Add new --with-baseaddr command line option to allow the FIPS base address of libeay32.dll to be explicitly specified. --- diff --git a/Configure b/Configure index 13d7f98d11..a38783dd98 100755 --- a/Configure +++ b/Configure @@ -622,6 +622,7 @@ my $openssldir=""; my $exe_ext=""; my $install_prefix=""; my $fipslibdir="/usr/local/ssl/lib"; +my $baseaddr="0xFB00000"; my $no_threads=0; my $no_shared=1; my $zlib=0; @@ -874,6 +875,10 @@ PROCESS_ARGS: { $fipslibdir="$1"; } + elsif (/^--with-baseaddr=(.*)$/) + { + $baseaddr="$1"; + } elsif (/^--with-zlib-include=(.*)$/) { $withargs{"zlib-include"}="-I$1"; @@ -1339,6 +1344,7 @@ while () s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/; s/^LIBZLIB=.*/LIBZLIB=$withargs{"zlib-lib"}/; s/^FIPSLIBDIR=.*/FIPSLIBDIR=$fipslibdir/; + s/^BASEADDR=.*/BASEADDR=$baseaddr/; s/^ZLIB_INCLUDE=.*/ZLIB_INCLUDE=$withargs{"zlib-include"}/; s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/; s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/; diff --git a/Makefile.org b/Makefile.org index 2e0bb2f2ef..b9db0dd57d 100644 --- a/Makefile.org +++ b/Makefile.org @@ -185,6 +185,11 @@ LIBZLIB= FIPSLIBDIR=/usr/local/ssl/lib +# Shared library base address. Currently only used on Windows. +# + +BASEADDR= + # When we're prepared to use shared libraries in the programs we link here # we might set SHLIB_MARK to '$(SHARED_LIBS)'. SHLIB_MARK= diff --git a/util/mk1mf.pl b/util/mk1mf.pl index d727b72001..05a6086164 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -19,6 +19,7 @@ my $fips_premain_c_path = ""; my $fips_sha1_exe_path = ""; my $fipslibdir = ""; +my $baseaddr = ""; my $ex_l_libs = ""; @@ -362,6 +363,9 @@ for (;;) if ($key eq "FIPSLIBDIR") { $fipslibdir=$val;} + if ($key eq "BASEADDR") + { $baseaddr=$val;} + if (!($_=)) { $_="RELATIVE_DIRECTORY=FINISHED\n"; } } @@ -514,6 +518,7 @@ MKCANISTER=$mkcanister E_PREMAIN_DSO=fips_premain_dso FIPSLIB_D=$fipslibdir +BASEADDR=$baseaddr FIPS_PREMAIN_SRC=$fips_premain_c_path O_FIPSCANISTER=$fips_canister_path FIPS_SHA1_EXE=$fips_sha1_exe_path @@ -783,7 +788,7 @@ if ($fips) $rules.= &do_lib_rule("\$(CRYPTOOBJ) \$(O_FIPSCANISTER)", "\$(O_CRYPTO)", "$crypto", - $shlib, "\$(SO_CRYPTO)", "0xFB00000"); + $shlib, "\$(SO_CRYPTO)", "\$(BASEADDR)"); } else {