mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-22 16:39:30 +01:00
Merge pull request #580 from gniltaws/2.9dev
Detect $TESTSSL_INSTALL_DIR when testssl is a symlinked command
This commit is contained in:
commit
0b24e80057
11
testssl.sh
11
testssl.sh
@ -9896,6 +9896,16 @@ get_install_dir() {
|
|||||||
[[ -r "$TESTSSL_INSTALL_DIR/cipher-mapping.txt" ]] && CIPHERS_BY_STRENGTH_FILE="$TESTSSL_INSTALL_DIR/cipher-mapping.txt"
|
[[ -r "$TESTSSL_INSTALL_DIR/cipher-mapping.txt" ]] && CIPHERS_BY_STRENGTH_FILE="$TESTSSL_INSTALL_DIR/cipher-mapping.txt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# still no cipher mapping file (and realpath is not present):
|
||||||
|
if [[ ! -r "$CIPHERS_BY_STRENGTH_FILE" ]] && which readlink &>/dev/null ; then
|
||||||
|
readlink -f ls &>/dev/null && \
|
||||||
|
TESTSSL_INSTALL_DIR=$(dirname $(readlink -f ${BASH_SOURCE[0]})) || \
|
||||||
|
TESTSSL_INSTALL_DIR=$(dirname $(readlink ${BASH_SOURCE[0]}))
|
||||||
|
# not sure whether Darwin has -f
|
||||||
|
CIPHERS_BY_STRENGTH_FILE="$TESTSSL_INSTALL_DIR/etc/cipher-mapping.txt"
|
||||||
|
[[ -r "$TESTSSL_INSTALL_DIR/cipher-mapping.txt" ]] && CIPHERS_BY_STRENGTH_FILE="$TESTSSL_INSTALL_DIR/cipher-mapping.txt"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -r "$CIPHERS_BY_STRENGTH_FILE" ]] ; then
|
if [[ ! -r "$CIPHERS_BY_STRENGTH_FILE" ]] ; then
|
||||||
unset ADD_RFC_STR
|
unset ADD_RFC_STR
|
||||||
debugme echo "$CIPHERS_BY_STRENGTH_FILE"
|
debugme echo "$CIPHERS_BY_STRENGTH_FILE"
|
||||||
@ -11708,4 +11718,3 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user