summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2011-11-07 00:22:59 +0000
committerAndy Polyakov <appro@openssl.org>2011-11-07 00:22:59 +0000
commit1562ce17cba9225ddb200859c2a17fcc0768860a (patch)
tree3989d8b45513baa0fc1ff588a8ff8ea978fa40f5
parent68b2f55b90698090a1cdc5c7178f6383891c8e02 (diff)
fipsld, incore: switch to new cross-compile support [from HEAD].
-rwxr-xr-xfips/fipsld28
-rwxr-xr-xutil/incore3
2 files changed, 19 insertions, 12 deletions
diff --git a/fips/fipsld b/fips/fipsld
index 6184e2064e..62565fd032 100755
--- a/fips/fipsld
+++ b/fips/fipsld
@@ -1,6 +1,6 @@
#!/bin/sh -e
#
-# Copyright (c) 2005-2007 The OpenSSL Project.
+# Copyright (c) 2005-2011 The OpenSSL Project.
#
# Depending on output file name, the script either embeds fingerprint
# into libcrypto.so or static application. "Static" refers to static
@@ -127,12 +127,15 @@ lib*|*.dll) # must be linking a shared lib...
"${PREMAIN_C}" \
${_WL_PREMAIN} "$@"
- # generate signature...
- if [ -z "${FIPS_SIG}" ]; then
- SIG=`"${PREMAIN_DSO}" "${TARGET}"`
- else
- SIG=`"${FIPS_SIG}" -dso "${TARGET}"`
+ if [ "x${FIPS_SIG}" != "x" ]; then
+ # embed signature
+ "${FIPS_SIG}" "${TARGET}"
+ [ $? -ne 42 ] && exit $?
fi
+
+ # generate signature...
+ SIG=`"${PREMAIN_DSO}" "${TARGET}"`
+
/bin/rm -f "${TARGET}"
if [ -z "${SIG}" ]; then
echo "unable to collect signature"; exit 1
@@ -172,12 +175,15 @@ lib*|*.dll) # must be linking a shared lib...
"${PREMAIN_C}" \
${_WL_PREMAIN} "$@"
- # generate signature...
- if [ -z "${FIPS_SIG}" ]; then
- SIG=`"${TARGET}"`
- else
- SIG=`"${FIPS_SIG}" -exe "${TARGET}"`
+ if [ "x${FIPS_SIG}" != "x" ]; then
+ # embed signature
+ "${FIPS_SIG}" "${TARGET}"
+ [ $? -ne 42 ] && exit $?
fi
+
+ # generate signature...
+ SIG=`"${TARGET}"`
+
/bin/rm -f "${TARGET}"
if [ -z "${SIG}" ]; then
echo "unable to collect signature"; exit 1
diff --git a/util/incore b/util/incore
index 883f63ff56..e6e6ecfd89 100755
--- a/util/incore
+++ b/util/incore
@@ -34,6 +34,7 @@
@e_ident{magic,class,data,version,osabi,abiver,pad}=
unpack("a4C*",$elf);
+ $!=42; # signal fipsld to revert to two-step link
die "not ELF file" if ($e_ident{magic} ne chr(0177)."ELF");
my $elf_bits = $e_ident{class}*32; # 32 or 64
@@ -377,7 +378,7 @@ $FIPS_text_endX = $exe->Lookup("FIPS_text_endX");
if (!$legacy_mode) {
if (!$FIPS_text_startX || !$FIPS_text_endX) {
print STDERR "@ARGV[$#ARGV] is not cross-compiler aware.\n";
- exit(1);
+ exit(42); # signal fipsld to revert to two-step link
}
$FINGERPRINT_ascii_value