1--TEST--
2ldap_set_option() - Basic test for TLS CA/Cert/CRL/DH/Key file ldap options
3--CREDITS--
4Chad Sikorra <Chad.Sikorra@gmail.com>
5--EXTENSIONS--
6ldap
7--FILE--
8<?php
9require "connect.inc";
10$link = ldap_connect($host, $port);
11
12foreach([
13    LDAP_OPT_X_TLS_CACERTDIR,
14    LDAP_OPT_X_TLS_CACERTFILE,
15    LDAP_OPT_X_TLS_CERTFILE,
16    LDAP_OPT_X_TLS_KEYFILE,
17    LDAP_OPT_X_TLS_CRLFILE,
18    LDAP_OPT_X_TLS_DHFILE,
19] as $option) {
20    $result = ldap_set_option($link, $option, '/foo/bar');
21    var_dump($result);
22
23    ldap_get_option($link, $option, $optionval);
24    var_dump($optionval);
25}
26?>
27--EXPECT--
28bool(true)
29string(8) "/foo/bar"
30bool(true)
31string(8) "/foo/bar"
32bool(true)
33string(8) "/foo/bar"
34bool(true)
35string(8) "/foo/bar"
36bool(true)
37string(8) "/foo/bar"
38bool(true)
39string(8) "/foo/bar"
40