1--TEST--
2ldap_set_option() - Basic test for TLS protocol min ldap option
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_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===DONE===
27--EXPECT--
28bool(true)
29int(512)
30bool(true)
31int(768)
32bool(true)
33int(769)
34bool(true)
35int(770)
36bool(true)
37int(771)
38===DONE===
39