Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ext/ldap/tests/ldap_set_option_tls_protocol_max_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ foreach([
LDAP_OPT_X_TLS_PROTOCOL_TLS1_0,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_1,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_2,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_3,
] as $option) {
$result = ldap_set_option($link, LDAP_OPT_X_TLS_PROTOCOL_MAX, $option);
var_dump($result);
Expand All @@ -35,5 +34,3 @@ bool(true)
int(770)
bool(true)
int(771)
bool(true)
int(772)
45 changes: 45 additions & 0 deletions ext/ldap/tests/ldap_set_option_tls_protocol_max_basic_tls13.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--TEST--
ldap_set_option() - Basic test for TLS protocol max ldap option
--CREDITS--
Chad Sikorra <[email protected]>
--EXTENSIONS--
ldap
--SKIPIF--
<?php

if (!defined("LDAP_OPT_X_TLS_PROTOCOL_MAX")) {
die('LDAP_OPT_X_TLS_PROTOCOL_MAX unsupported.');
}
--FILE--
<?php
require "connect.inc";
$link = ldap_connect($uri);

foreach([
LDAP_OPT_X_TLS_PROTOCOL_SSL2,
LDAP_OPT_X_TLS_PROTOCOL_SSL3,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_0,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_1,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_2,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_3,
] as $option) {
$result = ldap_set_option($link, LDAP_OPT_X_TLS_PROTOCOL_MAX, $option);
var_dump($result);

ldap_get_option($link, LDAP_OPT_X_TLS_PROTOCOL_MAX, $optionval);
var_dump($optionval);
}
?>
--EXPECT--
bool(true)
int(512)
bool(true)
int(768)
bool(true)
int(769)
bool(true)
int(770)
bool(true)
int(771)
bool(true)
int(772)
3 changes: 0 additions & 3 deletions ext/ldap/tests/ldap_set_option_tls_protocol_min_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ foreach([
LDAP_OPT_X_TLS_PROTOCOL_TLS1_0,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_1,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_2,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_3,
] as $option) {
$result = ldap_set_option($link, LDAP_OPT_X_TLS_PROTOCOL_MIN, $option);
var_dump($result);
Expand All @@ -35,5 +34,3 @@ bool(true)
int(770)
bool(true)
int(771)
bool(true)
int(772)
45 changes: 45 additions & 0 deletions ext/ldap/tests/ldap_set_option_tls_protocol_min_basic_tls13.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--TEST--
ldap_set_option() - Basic test for TLS protocol min ldap option
--CREDITS--
Chad Sikorra <[email protected]>
--EXTENSIONS--
ldap
--SKIPIF--
<?php

if (!defined("LDAP_OPT_X_TLS_PROTOCOL_TLS1_3")) {
die('LDAP_OPT_X_TLS_PROTOCOL_TLS1_3 unsupported.');
}
--FILE--
<?php
require "connect.inc";
$link = ldap_connect($uri);

foreach([
LDAP_OPT_X_TLS_PROTOCOL_SSL2,
LDAP_OPT_X_TLS_PROTOCOL_SSL3,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_0,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_1,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_2,
LDAP_OPT_X_TLS_PROTOCOL_TLS1_3,
] as $option) {
$result = ldap_set_option($link, LDAP_OPT_X_TLS_PROTOCOL_MIN, $option);
var_dump($result);

ldap_get_option($link, LDAP_OPT_X_TLS_PROTOCOL_MIN, $optionval);
var_dump($optionval);
}
?>
--EXPECT--
bool(true)
int(512)
bool(true)
int(768)
bool(true)
int(769)
bool(true)
int(770)
bool(true)
int(771)
bool(true)
int(772)