Skip to content

Commit 058f9c3

Browse files
committed
LDAP: Test TLS_PROTOCOL_MAX
1 parent 7b3e68f commit 058f9c3

File tree

3 files changed

+253
-240
lines changed

3 files changed

+253
-240
lines changed

.github/scripts/setup-slapd.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,20 @@ while : ; do
182182
fi
183183
fi
184184
done
185+
186+
# Debug: Test TLS_PROTOCOL_MAX setting like the failing PHP test
187+
echo "=== TLS DEBUG: Testing TLS_PROTOCOL_MAX 3.2 ==="
188+
TEMP_LDAP_CONF=$(mktemp)
189+
echo 'TLS_PROTOCOL_MAX 3.2' > "$TEMP_LDAP_CONF"
190+
191+
echo "Testing START_TLS with TLS_PROTOCOL_MAX 3.2 (should fail since server min is 3.3):"
192+
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
193+
debug_rt=$?
194+
if [ $debug_rt -eq 0 ]; then
195+
echo "TLS_PROTOCOL_MAX test: UNEXPECTED SUCCESS - TLS version restriction not working"
196+
exit 1
197+
else
198+
echo "TLS_PROTOCOL_MAX test: FAILED as expected (exit code $debug_rt)"
199+
fi
200+
rm -f "$TEMP_LDAP_CONF"
201+
echo ""

0 commit comments

Comments
 (0)