diff --git a/testssl.sh b/testssl.sh index 9f103e5..f5a7511 100755 --- a/testssl.sh +++ b/testssl.sh @@ -7221,7 +7221,7 @@ extract_certificates() { # Place the server's certificate in $HOSTCERT and any intermediate # certificates that were provided in $TEMPDIR/intermediatecerts.pem - savedir=$(pwd -P); cd $TEMPDIR + savedir="$PWD"; cd $TEMPDIR # http://backreference.org/2010/05/09/ocsp-verification-with-openssl/ if [[ "$version" == ssl2 ]]; then awk -v n=-1 '/Server certificate/ {start=1} @@ -16909,9 +16909,9 @@ find_openssl_binary() { openssl_location="$(type -p $OPENSSL)" [[ -n "$GIT_REL" ]] && \ - cwd="$(pwd -P)" || \ + cwd="$PWD" || \ cwd="$RUN_DIR" - if [[ "$openssl_location" =~ $(pwd -P)/bin ]]; then + if [[ "$openssl_location" == ${PWD}/bin ]]; then OPENSSL_LOCATION="\$PWD/bin/$(basename "$openssl_location")" elif [[ "$openssl_location" =~ $cwd ]] && [[ "$cwd" != '.' ]]; then OPENSSL_LOCATION="${openssl_location%%$cwd}"