xref: /PHP-5.5/ext/ldap/tests/README (revision 17aa2607)
1Most tests here relies on the availability of an LDAP server configured with TLS.
2
3Client/Server configuration:
4===========================================================
5OpenLDAP 2.3.43 has been used with the configuration below.
6
7Notes:
81.  A self signed certificate can be generated using:
9    $ openssl req -newkey rsa:1024 -x509 -nodes -out server.pem -keyout server.pem -days 3650
10    It is used for testing ldap_start_tls(), which also requires "TLS_REQCERT never" in client configuration
112.  An empty LDAP structure is required for the tests to be PASSed
12
13(/etc/openldap/)slapd.conf:
14-----------------------------------------------------------
15TLSCACertificateFile /etc/openldap/ssl/server.pem
16TLSCertificateFile /etc/openldap/ssl/server.pem
17TLSCertificateKeyFile /etc/openldap/ssl/server.pem
18TLSVerifyClient never
19
20# hdb is used instead of bdb as it enables the usage of referrals & aliases
21database        hdb
22suffix          "dc=my-domain,dc=com"
23checkpoint      32      30
24rootdn          "cn=Manager,dc=my-domain,dc=com"
25rootpw          secret
26directory       /var/lib/openldap-data
27index   objectClass     eq
28
29authz-regexp
30	uid=Manager,cn=digest-md5,cn=auth
31	cn=Manager,dc=my-domain,dc=com
32
33
34(/etc/openldap/)ldap.conf:
35-----------------------------------------------------------
36TLS_REQCERT never
37
38Tests configuration:
39===========================================================
40The following environment variables may be defined:
41LDAP_TEST_HOST (default: localhost)                        Host to connect to
42LDAP_TEST_PORT (default: 389)                              Port to connect to
43LDAP_TEST_USER (default: cn=Manager,dc=my-domain,dc=com)   DN used for binding
44LDAP_TEST_SASL_USER (default: Manager)                     SASL user used for SASL binding
45LDAP_TEST_PASSWD (default: secret)                         Password used for plain and SASL binding
46LDAP_TEST_OPT_PROTOCOL_VERSION (default: 3)                Version of LDAP protocol to use
47LDAP_TEST_SKIP_BIND_FAILURE (default: true)                Whether to fail the test or not in case binding fails
48
49Credits:
50===========================================================
51Davide Mendolia <idaf1er@gmail.com>
52Patrick Allaert <patrick.allaert@gmail.com>
53
54