File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,12 @@ def test_bind_tls_with_cafile
48
48
end
49
49
50
50
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'
52
52
@ldap . encryption (
53
53
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 } ,
55
57
)
56
58
assert @ldap . bind ( BIND_CREDS ) ,
57
59
@ldap . get_operation_result . inspect
@@ -61,7 +63,9 @@ def test_bind_tls_with_bad_hostname_no_verify_hostname_no_ca_opt_merge_passes
61
63
@ldap . host = '127.0.0.1'
62
64
@ldap . encryption (
63
65
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 ) ,
65
69
)
66
70
assert @ldap . bind ( BIND_CREDS ) ,
67
71
@ldap . get_operation_result . inspect
You can’t perform that action at this time.
0 commit comments