X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=tools%2Fc_rehash;h=60c28595bd026f2a5f84d986fa1ca7dbbfc9dfcb;hp=cd4e26a49be393ee2826ac3827ebe7c99062c4fa;hb=cb496082f8db564ac7c8054edf46a2a7dd5e7393;hpb=7dfb0b774e6592dcbfe47015168a0ac8b44e2a17 diff --git a/tools/c_rehash b/tools/c_rehash index cd4e26a49b..60c28595bd 100644 --- a/tools/c_rehash +++ b/tools/c_rehash @@ -4,13 +4,27 @@ # on the command line. # -if [ "$SSLEAY"x = "x" -o ! -x $SSLEAY ]; then +if [ "$SSLEAY"x = "x" -o ! -x "$SSLEAY" ]; then SSLEAY='ssleay' export SSLEAY fi DIR=/usr/local/ssl PATH=$DIR/bin:$PATH +if [ ! -f "$SSLEAY" ]; then + found=0 + for dir in . `echo $PATH | sed -e 's/:/ /g'`; do + if [ -f "$dir/$SSLEAY" ]; then + found=1 + break + fi + done + if [ $found = 0 ]; then + echo "c_rehash: rehashing skipped ('ssleay' program still not available)" 1>&2 + exit 0 + fi +fi + SSL_DIR=$DIR/certs if [ "$*" = "" ]; then