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--SKIPIF-- 6<?php require_once('skipif.inc'); ?> 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===DONE=== 28--EXPECT-- 29bool(true) 30string(8) "/foo/bar" 31bool(true) 32string(8) "/foo/bar" 33bool(true) 34string(8) "/foo/bar" 35bool(true) 36string(8) "/foo/bar" 37bool(true) 38string(8) "/foo/bar" 39bool(true) 40string(8) "/foo/bar" 41===DONE=== 42