Add OpenSSL 0.9.7e.
[dragonfly.git] / crypto / openssl-0.9.7e / fips / openssl_fips_fingerprint
1 #!/bin/sh
2 #
3 # Check the library fingerprint and generate an executable fingerprint, or
4 # return an error
5
6 lib=$1
7 exe=$2
8
9 # deal with the case where we're run from within the build and OpenSSL is
10 # not yet installed.  Also, make sure LD_LIBRARY_PATH is properly set in
11 # case shared libraries are built.
12 if [ "X$TOP" != "X" ]
13 then
14     PATH=$TOP/apps:$PATH
15     LD_LIBRARY_PATH=$TOP; export LD_LIBRARY_PATH
16 else
17     LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH
18 fi
19
20 echo "Checking library fingerprint for $lib"
21 openssl sha1 -hmac etaonrishdlcupfm $lib | sed "s/(.*\//(/" | diff $lib.sha1 - || { echo "$libs fingerprint mismatch"; exit 1; }
22
23 echo "Making fingerprint for $exe"
24 openssl sha1 -hmac etaonrishdlcupfm -binary $exe > $exe.sha1