1
0
mirror of https://github.com/drwetter/testssl.sh.git synced 2025-07-04 12:51:56 +02:00

Merge pull request from dcooper16/ldap_get_failure

ldap_get() should fail if curl fails
This commit is contained in:
Dirk Wetter
2018-05-07 10:55:54 +02:00
committed by GitHub

@ -1436,10 +1436,9 @@ ldap_get() {
if which curl &>/dev/null; then if which curl &>/dev/null; then
ldif="$(curl -s "$crl")" ldif="$(curl -s "$crl")"
if [[ $? -eq 0 ]]; then [[ $? -eq 0 ]] || return 1
awk '/certificateRevocationList/ { print $2 }' <<< "$ldif" | $OPENSSL base64 -d -A -out "$tmpfile" 2>/dev/null awk '/certificateRevocationList/ { print $2 }' <<< "$ldif" | $OPENSSL base64 -d -A -out "$tmpfile" 2>/dev/null
[[ -s "$tmpfile" ]] || return 1 [[ -s "$tmpfile" ]] || return 1
fi
return 0 return 0
else else
pr_litecyan " (for LDAP CRL check install \"curl\")" pr_litecyan " (for LDAP CRL check install \"curl\")"