OLD | NEW |
| (Empty) |
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 ext=${HMAC_EXT:-sha1} | |
9 | |
10 # deal with the case where we're run from within the build and OpenSSL is | |
11 # not yet installed. Also, make sure LD_LIBRARY_PATH is properly set in | |
12 # case shared libraries are built. | |
13 if [ "X$TOP" != "X" ] | |
14 then | |
15 if test "$OSTYPE" = msdosdjgpp; then | |
16 PATH="$TOP/apps;$TOP;$PATH" | |
17 else | |
18 PATH="$TOP/apps:$TOP:$PATH" | |
19 fi | |
20 LD_LIBRARY_PATH=$TOP; export LD_LIBRARY_PATH | |
21 else | |
22 LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH | |
23 fi | |
24 | |
25 echo "Checking library fingerprint for $lib" | |
26 openssl sha1 -hmac etaonrishdlcupfm $lib | sed "s/(.*\//(/" | diff -w $lib.sha1
- || { echo "$libs fingerprint mismatch"; exit 1; } | |
27 | |
28 [ -x $exe.exe ] && exe=$exe.exe | |
29 | |
30 echo "Making fingerprint for $exe" | |
31 openssl sha1 -hmac etaonrishdlcupfm -binary $exe > $exe.$ext || rm $exe.$ext | |
OLD | NEW |