Skip to content

LDAP: Test TLS_PROTOCOL_MAX #19263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/scripts/setup-slapd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,23 @@ EOF

sudo service slapd restart

# Debug: Test TLS_PROTOCOL_MAX setting like the failing PHP test
echo "=== TLS DEBUG: Testing TLS_PROTOCOL_MAX 3.2 ==="
TEMP_LDAP_CONF=$(mktemp)
echo 'TLS_PROTOCOL_MAX 3.2' > "$TEMP_LDAP_CONF"

echo "Testing START_TLS with TLS_PROTOCOL_MAX 3.2 (should fail since server min is 3.3):"
LDAPCONF="$TEMP_LDAP_CONF" ldapsearch -H ldap://localhost -D cn=Manager,dc=my-domain,dc=com -w secret -s base -b dc=my-domain,dc=com -Z 'objectclass=*' >/dev/null 2>&1
debug_rt=$?
if [ $debug_rt -eq 0 ]; then
echo "TLS_PROTOCOL_MAX test: UNEXPECTED SUCCESS - TLS version restriction not working"
exit 1
else
echo "TLS_PROTOCOL_MAX test: FAILED as expected (exit code $debug_rt)"
fi
rm -f "$TEMP_LDAP_CONF"
echo ""

# Verify TLS connection
tries=0
while : ; do
Expand All @@ -182,3 +199,4 @@ while : ; do
fi
fi
done

Loading
Loading