1--TEST-- 2ldap_set_option() - Basic test for TLS protocol min ldap option 3--CREDITS-- 4Chad Sikorra <Chad.Sikorra@gmail.com> 5--EXTENSIONS-- 6ldap 7--FILE-- 8<?php 9require "connect.inc"; 10$link = ldap_connect($uri); 11 12foreach([ 13 LDAP_OPT_X_TLS_PROTOCOL_SSL2, 14 LDAP_OPT_X_TLS_PROTOCOL_SSL3, 15 LDAP_OPT_X_TLS_PROTOCOL_TLS1_0, 16 LDAP_OPT_X_TLS_PROTOCOL_TLS1_1, 17 LDAP_OPT_X_TLS_PROTOCOL_TLS1_2, 18] as $option) { 19 $result = ldap_set_option($link, LDAP_OPT_X_TLS_PROTOCOL_MIN, $option); 20 var_dump($result); 21 22 ldap_get_option($link, LDAP_OPT_X_TLS_PROTOCOL_MIN, $optionval); 23 var_dump($optionval); 24} 25?> 26--EXPECT-- 27bool(true) 28int(512) 29bool(true) 30int(768) 31bool(true) 32int(769) 33bool(true) 34int(770) 35bool(true) 36int(771) 37