mirror of
https://github.com/drwetter/testssl.sh.git
synced 2026-07-15 03:27:38 +02:00
Add HAS_LDAP to global vars
... and bail out if it is not supported.
This commit is contained in:
+10
-1
@@ -361,6 +361,7 @@ HAS_ALPN=false
|
|||||||
HAS_NPN=false
|
HAS_NPN=false
|
||||||
HAS_FALLBACK_SCSV=false
|
HAS_FALLBACK_SCSV=false
|
||||||
HAS_PROXY=false
|
HAS_PROXY=false
|
||||||
|
HAS_LDAP=false
|
||||||
HAS_XMPP=false
|
HAS_XMPP=false
|
||||||
HAS_XMPP_SERVER=false
|
HAS_XMPP_SERVER=false
|
||||||
HAS_POSTGRES=false
|
HAS_POSTGRES=false
|
||||||
@@ -21486,6 +21487,7 @@ find_openssl_binary() {
|
|||||||
HAS_NPN=false
|
HAS_NPN=false
|
||||||
HAS_FALLBACK_SCSV=false
|
HAS_FALLBACK_SCSV=false
|
||||||
HAS_PROXY=false
|
HAS_PROXY=false
|
||||||
|
HAS_LDAP=false
|
||||||
HAS_XMPP=false
|
HAS_XMPP=false
|
||||||
HAS_XMPP_SERVER=false
|
HAS_XMPP_SERVER=false
|
||||||
HAS_XMPP_SERVER2=false
|
HAS_XMPP_SERVER2=false
|
||||||
@@ -21621,6 +21623,8 @@ find_openssl_binary() {
|
|||||||
grep -q 'xmpp' $s_client_starttls_has && HAS_XMPP=true
|
grep -q 'xmpp' $s_client_starttls_has && HAS_XMPP=true
|
||||||
grep -Eq 'xmpp-server|xmpp\[-server\]' $s_client_starttls_has && HAS_XMPP_SERVER=true
|
grep -Eq 'xmpp-server|xmpp\[-server\]' $s_client_starttls_has && HAS_XMPP_SERVER=true
|
||||||
|
|
||||||
|
# Seems like LibreSSL on MacOS somehow lost this with 26.5.2?
|
||||||
|
grep -q 'ldap' $s_client_has && HAS_LDAP=false
|
||||||
grep -q 'postgres' $s_client_starttls_has && HAS_POSTGRES=true
|
grep -q 'postgres' $s_client_starttls_has && HAS_POSTGRES=true
|
||||||
grep -q 'mysql' $s_client_starttls_has && HAS_MYSQL=true
|
grep -q 'mysql' $s_client_starttls_has && HAS_MYSQL=true
|
||||||
grep -q 'lmtp' $s_client_starttls_has && HAS_LMTP=true
|
grep -q 'lmtp' $s_client_starttls_has && HAS_LMTP=true
|
||||||
@@ -24091,7 +24095,7 @@ determine_service() {
|
|||||||
if "$HAS_XMPP"; then
|
if "$HAS_XMPP"; then
|
||||||
# small hack -- instead of changing calls all over the place
|
# small hack -- instead of changing calls all over the place
|
||||||
STARTTLS="$STARTTLS -xmpphost $NODE"
|
STARTTLS="$STARTTLS -xmpphost $NODE"
|
||||||
else
|
llelse
|
||||||
# If the XMPP name cannot be provided using -xmpphost,
|
# If the XMPP name cannot be provided using -xmpphost,
|
||||||
# then it needs to be provided to the -connect option
|
# then it needs to be provided to the -connect option
|
||||||
NODEIP="$NODE"
|
NODEIP="$NODE"
|
||||||
@@ -24101,6 +24105,11 @@ determine_service() {
|
|||||||
#FIXME: make use of HAS_XMPP_SERVER2
|
#FIXME: make use of HAS_XMPP_SERVER2
|
||||||
fatal "Your $OPENSSL does not support the \"-starttls xmpp-server\" option" $ERR_OSSLBIN
|
fatal "Your $OPENSSL does not support the \"-starttls xmpp-server\" option" $ERR_OSSLBIN
|
||||||
fi
|
fi
|
||||||
|
elif [[ "$protocol" == ldap ]]; then
|
||||||
|
# Check if openssl version supports postgres.
|
||||||
|
if ! "$HAS_LDAP"; then
|
||||||
|
fatal "Your $OPENSSL does not support the \"-starttls ldap\" option" $ERR_OSSLBIN
|
||||||
|
fi
|
||||||
elif [[ "$protocol" == postgres ]]; then
|
elif [[ "$protocol" == postgres ]]; then
|
||||||
# Check if openssl version supports postgres.
|
# Check if openssl version supports postgres.
|
||||||
if ! "$HAS_POSTGRES"; then
|
if ! "$HAS_POSTGRES"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user