mirror of
https://github.com/php/php-src.git
synced 2024-12-15 04:45:03 +08:00
42 lines
815 B
PHP
42 lines
815 B
PHP
--TEST--
|
|
ldap_set_option() - Basic test for TLS CA/Cert/CRL/DH/Key file ldap options
|
|
--CREDITS--
|
|
Chad Sikorra <Chad.Sikorra@gmail.com>
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
require "connect.inc";
|
|
$link = ldap_connect($host, $port);
|
|
|
|
foreach([
|
|
LDAP_OPT_X_TLS_CACERTDIR,
|
|
LDAP_OPT_X_TLS_CACERTFILE,
|
|
LDAP_OPT_X_TLS_CERTFILE,
|
|
LDAP_OPT_X_TLS_KEYFILE,
|
|
LDAP_OPT_X_TLS_CRLFILE,
|
|
LDAP_OPT_X_TLS_DHFILE,
|
|
] as $option) {
|
|
$result = ldap_set_option($link, $option, '/foo/bar');
|
|
var_dump($result);
|
|
|
|
ldap_get_option($link, $option, $optionval);
|
|
var_dump($optionval);
|
|
}
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
bool(true)
|
|
string(8) "/foo/bar"
|
|
bool(true)
|
|
string(8) "/foo/bar"
|
|
bool(true)
|
|
string(8) "/foo/bar"
|
|
bool(true)
|
|
string(8) "/foo/bar"
|
|
bool(true)
|
|
string(8) "/foo/bar"
|
|
bool(true)
|
|
string(8) "/foo/bar"
|
|
===DONE===
|