1--TEST--
2ldap_option_reqcert_error() - A test to check if ldap cant connect to a LDAP server with a invalid certificate with certificate checking enabled
3--CREDITS--
4Edwin Hoksberg <edwin@edwinhoksberg.nl>
5--SKIPIF--
6<?php
7	require_once dirname(__FILE__) .'/skipif.inc';
8	require_once dirname(__FILE__) .'/skipifbindfailure.inc';
9?>
10--FILE--
11<?php
12require "connect.inc";
13
14ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_HARD);
15
16$link = ldap_connect($host, $port);
17ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
18
19var_dump(@ldap_bind($link, $user, $passwd));
20?>
21===DONE===
22--EXPECT--
23bool(true)
24===DONE===
25