Bug #73558 [ReO]: LDAP_OPT_X_TLS_CACERTFILE silently ignored
| From: | heiglandreas@php.net | Date: | Tue, 27 Jul 2021 06:54:38 +0000 |
| Subject: | Bug #73558 [ReO]: LDAP_OPT_X_TLS_CACERTFILE silently ignored | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235389@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73558&edit=1
ID: 73558
Updated by: heiglandreas@php.net
Reported by: jmaguire at duo dot com
Summary: LDAP_OPT_X_TLS_CACERTFILE silently ignored
Status: Re-Opened
Type: Bug
Package: LDAP related
Operating System: Linux
PHP Version: 7.1.0RC6
Assigned To: heiglandreas
Block user comment: N
Private report: N
New Comment:
Which LDAP-API Version are we talking about here?
You can find that via
php -i | grep -i "LDAP Support" -A 5
As some of the functionality is not available with older API-Versions.
Previous Comments:
------------------------------------------------------------------------
[2021-07-26 13:26:14] cmb@php.net
Re-opening, since this appears to still be unresolved. Apparently
related to bug #78029.
------------------------------------------------------------------------
[2019-08-27 19:05:16] jimp at netgate dot com
I've been experimenting with this and it doesn't appear to have any effect on PHP 7.3
running under PHP-FPM on FreeBSD (11.x or 12.x), and OpenSSL 1.0 or 1.1.1 didn't make a
difference either.
I can only make a successful LDAP connection with a self-signed CA when using putenv() to set
LDAPTLS_REQCERT/LDAPTLS_CACERTDIR/LDAPTLS_CACERT. If I try using ldap_set_option(), the only result
is failure with a packet capture showing an "unknown CA" error being sent back to the
server.
I was using it this way:
ldap_set_option($ldap, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_HARD);
ldap_set_option($ldap, LDAP_OPT_X_TLS_CACERTDIR, "/var/certs/");
ldap_set_option($ldap, LDAP_OPT_X_TLS_CACERTFILE, "/var/certs/blah.ca");
------------------------------------------------------------------------
[2019-01-15 21:20:58] theodorejb at outlook dot com
I'm also having this issue on Windows with PHP 7.3.0.
------------------------------------------------------------------------
[2018-12-03 10:54:53] mail at ckristo dot net
Hi,
We have an internal CA which we need to add in order to establish a LDAPS connetion successfully. On
our setup, we encounter the same issue, it seems that ldap_set_option($ldap,
LDAP_OPT_X_TLS_CACERTFILE, '<val>') and ldap_set_option($ldap,
LDAP_OPT_X_TLS_CACERTDIR, '<val>') are completely ignored. When setting the
same paths via .ldaprc, PHP LDAP works fine.
Best regards,
Chris
------------------------------------------------------------------------
[2017-01-22 04:22:52] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=73558
--
Edit this bug report at https://bugs.php.net/bug.php?id=73558&edit=1