1--TEST-- 2ldap_option_reqcert_basic() - Error test for TLS require cert ldap option 3--SKIPIF-- 4<?php require 'skipif.inc'; ?> 5--CREDITS-- 6Edwin Hoksberg <edwin@edwinhoksberg.nl> 7--FILE-- 8<?php 9require "connect.inc"; 10$link = ldap_connect($host, $port); 11 12foreach([ 13 LDAP_OPT_X_TLS_NEVER, 14 LDAP_OPT_X_TLS_HARD, 15 LDAP_OPT_X_TLS_DEMAND, 16 LDAP_OPT_X_TLS_ALLOW, 17 LDAP_OPT_X_TLS_TRY, 18] as $option) { 19 $result = ldap_set_option($link, LDAP_OPT_X_TLS_REQUIRE_CERT, $option); 20 var_dump($result); 21 22 ldap_get_option($link, LDAP_OPT_X_TLS_REQUIRE_CERT, $optionval); 23 var_dump($optionval); 24} 25?> 26===DONE=== 27--EXPECT-- 28bool(true) 29int(0) 30bool(true) 31int(1) 32bool(true) 33int(2) 34bool(true) 35int(3) 36bool(true) 37int(4) 38===DONE=== 39