source: src/router/php7/ext/ldap/tests/ldap_set_option_crlcheck_basic.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 844 bytes
Line 
1--TEST--
2ldap_set_option() - Basic test for TLS CRL check ldap option
3--CREDITS--
4Chad Sikorra <Chad.Sikorra@gmail.com>
5--SKIPIF--
6<?php require_once('skipif.inc'); ?>
7<?php
8        require "connect.inc";
9        $link = ldap_connect($host, $port);
10        ldap_get_option($link, LDAP_OPT_X_TLS_PACKAGE, $package);
11        if ($package != 'OpenSSL') {
12                die("skip OpenSSL required for CRL check options, got: $package");
13        }
14?>
15--FILE--
16<?php
17require "connect.inc";
18$link = ldap_connect($host, $port);
19
20foreach([
21        LDAP_OPT_X_TLS_CRL_NONE,
22        LDAP_OPT_X_TLS_CRL_PEER,
23        LDAP_OPT_X_TLS_CRL_ALL,
24] as $option) {
25        $result = ldap_set_option($link, LDAP_OPT_X_TLS_CRLCHECK, $option);
26        var_dump($result);
27
28        ldap_get_option($link, LDAP_OPT_X_TLS_CRLCHECK, $optionval);
29        var_dump($optionval);
30}
31?>
32===DONE===
33--EXPECT--
34bool(true)
35int(0)
36bool(true)
37int(1)
38bool(true)
39int(2)
40===DONE===
Note: See TracBrowser for help on using the repository browser.