#!/bin/sh
#
# Example of building OpenSSL 0.9.7l with FIPS enabled. Use at
# your own risk. It is unsupported and released in the public
# domain.
#
# Andrew Donofrio 02-16-2007 v0.0.0.0.1
#

OSSL_PATH=/home/despot/at/openssl
OSSL_SRC_ROOT=/home/despot/at/openssl-0.9.7l

cd $OSSL_SRC_ROOT 
make clean
mkdir $OSSL_PATH 
mkdir $OSSL_PATH/lib
touch $OSSL_PATH/lib/fipscanister.o
./config fips --prefix=$OSSL_PATH --openssldir=$OSSL_PATH --with-fipslibdir=$OSSL_PATH/lib
cd fips-1.0; make
sha/fips_standalone_sha1 fips_premain.c > fips_premain.c.sha1
cp -f fips_premain.c $OSSL_PATH/lib/
cp -f fips_premain.c.sha1 $OSSL_PATH/lib/
make fipscanister.o
cp -f fipscanister.o $OSSL_PATH/lib/
cp -f fipscanister.o.sha1 $OSSL_PATH/lib/
cd aes;make clean;cd ..
cd des;make clean;cd ..
cd dh;make clean;cd ..
cd dsa;make clean;cd ..
cd hmac;make clean;cd ..
cd rand;make clean;cd ..
cd rsa;make clean;cd ..
cd sha;make clean;cd ..
cd ..
make;make install
