Note: This is the reincarnation of xp-framework/xp-framework#209 /cc @kiesel
Using self-signed certificates and/or an internal CA yields problems with ext/ldap and and ext/curl:
$ xp -w '(new \peer\ldap\LDAPConnection("ldaps://ldap.1and1.org"))->connect()'
Uncaught exception: Exception peer.ConnectException (Cannot connect to ldaps://ldap.1and1.org:636)
at <main>::ldap_bind() [line 101 of LDAPConnection.class.php] ldap_bind(): Unable to bind to server: Can't contact LDAP server
(With LDAP debugging, we see the reason: TLS certificate verification: Error, self signed certificate in certificate chain)
$ xp -w '(new \peer\http\HttpConnection("https://bitbucket.1and1.org"))->get()'
Uncaught exception: Exception io.IOException (60: SSL certificate problem: self signed certificate in certificate chain)
at peer.http.CurlHttpTransport::send(peer.http.HttpRequest{}, 60, 2) [line 123 of HttpConnection.class.php]
(Here, it's obvious)
The problem is that these don't use the Windows certificate store which contains the certificate, while ext/openssl does since PHP 5.6.0 - see the Changelog:
Fallback to Windows CA cert store for peer verification if no openssl.cafile ini directive or "cafile" SSL context option specified in Windows.
Source: http://php.net/ChangeLog-5.php#5.6.0 and the code
Note: This is the reincarnation of xp-framework/xp-framework#209 /cc @kiesel
Using self-signed certificates and/or an internal CA yields problems with ext/ldap and and ext/curl:
(With LDAP debugging, we see the reason:
TLS certificate verification: Error, self signed certificate in certificate chain)(Here, it's obvious)
The problem is that these don't use the Windows certificate store which contains the certificate, while ext/openssl does since PHP 5.6.0 - see the Changelog:
Source: http://php.net/ChangeLog-5.php#5.6.0 and the code