1--TEST--
2ldap_option_reqcert_basic() - Basic test to check if PHP can connect to a LDAP server with an invalid certificate with certificate checking disabled
3--CREDITS--
4Edwin Hoksberg <edwin@edwinhoksberg.nl>
5--EXTENSIONS--
6ldap
7--SKIPIF--
8<?php
9    require_once __DIR__ .'/skipifbindfailure.inc';
10?>
11--FILE--
12<?php
13require "connect.inc";
14
15ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);
16
17$link = ldap_connect($uri);
18ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
19
20var_dump(@ldap_bind($link, $user, $passwd));
21?>
22--EXPECT--
23bool(true)
24