use LdapTools\DomainConfiguration;
// Make sure to set your LDAP options for your Domain Configuration...
$domain = (new DomainConfiguration('example.local'))
->setBaseDn('dc=example,dc=local')
->setServers(['dc1.example.local', 'dc2.example.local'])
->setUsername('foo')
->setPassword('secret')
->setUseTls(true)
->setLdapOptions([
'LDAP_OPT_X_TLS_CACERTFILE' => '/path/to/ldap-ssl-bundle',
'LDAP_OPT_X_TLS_REQUIRE_CERT' => LDAP_OPT_X_TLS_HARD,
]);
This code in LdapConnection.php generate executions
ldap_set_option($this->connection, LDAP_OPT_X_TLS_CACERTFILE, '/www/users/ldap-ssl-bundle01.crt');
ldap_set_option($this->connection, LDAP_OPT_X_TLS_REQUIRE_CERT, 'LDAP_OPT_X_TLS_HARD');
Because it enviroment variables for > PHP 7.1 right code will be
ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, '/www/users/ldap-ssl-bundle01.crt');
ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, 'LDAP_OPT_X_TLS_HARD');
This code in LdapConnection.php generate executions
Because it enviroment variables for > PHP 7.1 right code will be