Skip to content

Commit b3c3570

Browse files
committed
Fix tests
1 parent 69aa6f4 commit b3c3570

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/integration/test_bind.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ def test_bind_tls_with_cafile
4848
end
4949

5050
def test_bind_tls_with_bad_hostname_no_verify_hostname_no_ca_passes
51-
@ldap.host = INTEGRATION_HOSTNAME
51+
@ldap.host = '127.0.0.1'
5252
@ldap.encryption(
5353
method: :start_tls,
54-
tls_options: { verify_hostname: false },
54+
tls_options: { verify_mode: OpenSSL::SSL::VERIFY_PEER,
55+
verify_hostname: false,
56+
ca_file: CA_FILE },
5557
)
5658
assert @ldap.bind(BIND_CREDS),
5759
@ldap.get_operation_result.inspect
@@ -61,7 +63,9 @@ def test_bind_tls_with_bad_hostname_no_verify_hostname_no_ca_opt_merge_passes
6163
@ldap.host = '127.0.0.1'
6264
@ldap.encryption(
6365
method: :start_tls,
64-
tls_options: TLS_OPTS.merge(verify_hostname: false),
66+
tls_options: TLS_OPTS.merge(verify_mode: OpenSSL::SSL::VERIFY_PEER,
67+
verify_hostname: false,
68+
ca_file: CA_FILE),
6569
)
6670
assert @ldap.bind(BIND_CREDS),
6771
@ldap.get_operation_result.inspect

0 commit comments

Comments
 (0)