mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
Merge pull request #1523 from drwetter/pwdfix3.1
Avoid external "/bin/pwd"
This commit is contained in:
commit
5aadc1951d
@ -7292,7 +7292,7 @@ extract_certificates() {
|
|||||||
|
|
||||||
# Place the server's certificate in $HOSTCERT and any intermediate
|
# Place the server's certificate in $HOSTCERT and any intermediate
|
||||||
# certificates that were provided in $TEMPDIR/intermediatecerts.pem
|
# certificates that were provided in $TEMPDIR/intermediatecerts.pem
|
||||||
savedir=$(pwd); cd $TEMPDIR
|
savedir="$PWD"; cd $TEMPDIR
|
||||||
# http://backreference.org/2010/05/09/ocsp-verification-with-openssl/
|
# http://backreference.org/2010/05/09/ocsp-verification-with-openssl/
|
||||||
if [[ "$version" == ssl2 ]]; then
|
if [[ "$version" == ssl2 ]]; then
|
||||||
awk -v n=-1 '/Server certificate/ {start=1}
|
awk -v n=-1 '/Server certificate/ {start=1}
|
||||||
@ -18034,9 +18034,9 @@ find_openssl_binary() {
|
|||||||
|
|
||||||
openssl_location="$(type -p $OPENSSL)"
|
openssl_location="$(type -p $OPENSSL)"
|
||||||
[[ -n "$GIT_REL" ]] && \
|
[[ -n "$GIT_REL" ]] && \
|
||||||
cwd="$(/bin/pwd)" || \
|
cwd="$PWD" || \
|
||||||
cwd="$RUN_DIR"
|
cwd="$RUN_DIR"
|
||||||
if [[ "$openssl_location" =~ $(/bin/pwd)/bin ]]; then
|
if [[ "$openssl_location" == ${PWD}/bin ]]; then
|
||||||
OPENSSL_LOCATION="\$PWD/bin/$(basename "$openssl_location")"
|
OPENSSL_LOCATION="\$PWD/bin/$(basename "$openssl_location")"
|
||||||
elif [[ "$openssl_location" =~ $cwd ]] && [[ "$cwd" != '.' ]]; then
|
elif [[ "$openssl_location" =~ $cwd ]] && [[ "$cwd" != '.' ]]; then
|
||||||
OPENSSL_LOCATION="${openssl_location%%$cwd}"
|
OPENSSL_LOCATION="${openssl_location%%$cwd}"
|
||||||
|
Loading…
Reference in New Issue
Block a user