Hello, I'm new to the mailing list.  I have been trying to cross compile
openssl with FIPS for several ARMv5 processors running both Linux 2.4
and Linux 2.6 kernels.

I have used the openssl-fips-2.0-test-20120503.tar.gz and
openssl-1.0.1b.tar.gz archives from openssl.org.  I downloaded the
incore2 script and installed it in the openssl-fips directory.  

I had to modify line 132 of the fipsld script from the openssl-fips
distribution to add the "-dso" option.  The incore2 script requires that
either the "-dso" or "-exe" flag be passed. I also added  a line to dump
the md5sum of libcrypto.so.1.0.0 before and after the call to incore2. 

          "${FIPS_SIG}" -dso "${TARGET}" 

I have used the following two scripts to build openssl-fips and openssl
respectively:

============================================ build_openssl-fips.sh
#!/bin/bash -x

PWD=`pwd`
#rm -rf openssl-fips-2.0-test-$FIPSDTG
#tar xfz openssl-fips-2.0-test-$FIPSDTG.tar.gz

export FIPSPWD=openssl-fips-2.0-test-$FIPSDTG
export CROSS_COMPILE
export PREFIX
export BASE
export VER
export FIPSDIR=$PWD/../FipsDir
export FIPS_SIG=$PWD/incore2
echo "Installing $BASE.$VER"
echo "==================================================="
echo "Cross compiler path = $CROSS_COMPILE"

cd ${FIPSPWD}
./config no-asm
touch Makefile
make depend
make
make install


================================================= build_openssl.sh
#!/bin/bash -x

PWD=`pwd`
BASE="openssl-1.0.1"
VER="1.1.0"
export CROSS_COMPILE
export PREFIX
export BASE
export VER
export FIPSDIR=$PWD/../FipsDir
export FIPS_SIG="$PWD/../openssl-fips/incore2"
echo "Installing $BASE.$VER"
echo
"==============================================================================="
echo "Cross compiler path = $CROSS_COMPILE"

./config fips shared no-asm || { echo -e "\nFAILED while running
\'config\' for openssl\n" && exit 1; }
touch Makefile
make || { echo -e "\nFAILED while running \'make\' for openssl\n" &&
exit 1; }


These builds run to completion without errors, the md5sum's I added to
fipsld shows that libcrypto.so.1.0.0 was unchanged by the incore2
script. 

When I install the resulting libcrypto.so.1.0.0, libssl.so.1.0.0 and the
openssl binary on an embedded system, any attempt to run openssl results
in what appears to be a random string of characters, even a simple
"./openssl -h". 

Rick Phillips

Reply via email to