You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test LDAP_OPT_X_TLS_ALLOW
TLS certificate verification: Error, unable to get local issuer certificate
TLS certificate verification: Error, unable to verify the first certificate
LDAP bind succeeded (expected)
Test LDAP_OPT_X_TLS_DEMAND
TLS certificate verification: Error, unable to get local issuer certificate
TLS certificate verification: Error, unable to verify the first certificate
TLS: unable to get peer certificate.
LDAP bind succeeded (unexpected)
But I expected this output instead:
Test LDAP_OPT_X_TLS_ALLOW
TLS certificate verification: Error, unable to get local issuer certificate
TLS certificate verification: Error, unable to verify the first certificate
LDAP bind succeeded (expected)
Test LDAP_OPT_X_TLS_DEMAND
TLS certificate verification: Error, unable to get local issuer certificate
TLS: can't connect: error:0A000086:SSL routines::certificate verify failed (unable to get local issuer certificate).
PHP Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server in /tmp/ldap.php on line 26
LDAP bind failed (expected)
Full reproducer:
docker run --rm -it docker.io/smblds/smblds:latest /bin/sh
If I reverse the two tests, both tests will fail for LDAP bind instead of both succeeding
If I'm not overlooking something, ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, $option) can't be overridden, but I also don't receive any failure for ldap_set_option(). And $ldapconn = ldap_connect('ldaps://localhost:636'); ldap_set_option($ldapconn, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_ALLOW); doesn't work.
PHP Version
PHP 8.4.3 (with OpenLDAP 2.6.8)
Operating System
Alpine Linux 3.21.2
The text was updated successfully, but these errors were encountered:
Description
The following code:
Resulted in this output:
But I expected this output instead:
Full reproducer:
docker run --rm -it docker.io/smblds/smblds:latest /bin/sh
rm -f /root/.ldaprc
apk update
apk add php84-cli php84-ldap
php84 /tmp/ldap.php
If I'm not overlooking something,
ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, $option)
can't be overridden, but I also don't receive any failure forldap_set_option()
. And$ldapconn = ldap_connect('ldaps://localhost:636'); ldap_set_option($ldapconn, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_ALLOW);
doesn't work.PHP Version
PHP 8.4.3 (with OpenLDAP 2.6.8)
Operating System
Alpine Linux 3.21.2
The text was updated successfully, but these errors were encountered: