@@ -57,7 +57,7 @@ def test_bind_tls_with_bad_hostname_verify_none_no_ca_passes
5757 end
5858
5959 def test_bind_tls_with_bad_hostname_verify_none_no_ca_opt_merge_passes
60- @ldap . host = '127.0.0.1 '
60+ @ldap . host = 'cert.mismatch.example.org '
6161 @ldap . encryption (
6262 method : :start_tls ,
6363 tls_options : TLS_OPTS . merge ( verify_mode : OpenSSL ::SSL ::VERIFY_NONE ) ,
@@ -67,7 +67,7 @@ def test_bind_tls_with_bad_hostname_verify_none_no_ca_opt_merge_passes
6767 end
6868
6969 def test_bind_tls_with_bad_hostname_verify_peer_ca_fails
70- @ldap . host = '127.0.0.1 '
70+ @ldap . host = 'cert.mismatch.example.org '
7171 @ldap . encryption (
7272 method : :start_tls ,
7373 tls_options : { verify_mode : OpenSSL ::SSL ::VERIFY_PEER ,
@@ -84,7 +84,7 @@ def test_bind_tls_with_bad_hostname_verify_peer_ca_fails
8484 end
8585
8686 def test_bind_tls_with_bad_hostname_ca_default_opt_merge_fails
87- @ldap . host = '127.0.0.1 '
87+ @ldap . host = 'cert.mismatch.example.org '
8888 @ldap . encryption (
8989 method : :start_tls ,
9090 tls_options : TLS_OPTS . merge ( ca_file : CA_FILE ) ,
@@ -100,7 +100,7 @@ def test_bind_tls_with_bad_hostname_ca_default_opt_merge_fails
100100 end
101101
102102 def test_bind_tls_with_bad_hostname_ca_no_opt_merge_fails
103- @ldap . host = '127.0.0.1 '
103+ @ldap . host = 'cert.mismatch.example.org '
104104 @ldap . encryption (
105105 method : :start_tls ,
106106 tls_options : { ca_file : CA_FILE } ,
@@ -138,7 +138,7 @@ def test_bind_tls_with_valid_hostname_just_verify_peer_ca_passes
138138 end
139139
140140 def test_bind_tls_with_bogus_hostname_system_ca_fails
141- @ldap . host = '127.0.0.1 '
141+ @ldap . host = 'cert.mismatch.example.org '
142142 @ldap . encryption ( method : :start_tls , tls_options : { } )
143143 error = assert_raise Net ::LDAP ::Error ,
144144 Net ::LDAP ::ConnectionRefusedError do
@@ -164,7 +164,7 @@ def test_bind_tls_with_multiple_hosts
164164
165165 def test_bind_tls_with_multiple_bogus_hosts
166166 @ldap . host = nil
167- @ldap . hosts = [ [ '127.0.0.1 ' , 389 ] , [ 'bogus.example.com' , 389 ] ]
167+ @ldap . hosts = [ [ 'cert.mismatch.example.org ' , 389 ] , [ 'bogus.example.com' , 389 ] ]
168168 @ldap . encryption (
169169 method : :start_tls ,
170170 tls_options : TLS_OPTS . merge ( verify_mode : OpenSSL ::SSL ::VERIFY_PEER ,
@@ -180,7 +180,7 @@ def test_bind_tls_with_multiple_bogus_hosts
180180
181181 def test_bind_tls_with_multiple_bogus_hosts_no_verification
182182 @ldap . host = nil
183- @ldap . hosts = [ [ '127.0.0.1 ' , 389 ] , [ 'bogus.example.com' , 389 ] ]
183+ @ldap . hosts = [ [ 'cert.mismatch.example.org ' , 389 ] , [ 'bogus.example.com' , 389 ] ]
184184 @ldap . encryption (
185185 method : :start_tls ,
186186 tls_options : TLS_OPTS . merge ( verify_mode : OpenSSL ::SSL ::VERIFY_NONE ) ,
@@ -191,7 +191,7 @@ def test_bind_tls_with_multiple_bogus_hosts_no_verification
191191
192192 def test_bind_tls_with_multiple_bogus_hosts_ca_check_only_fails
193193 @ldap . host = nil
194- @ldap . hosts = [ [ '127.0.0.1 ' , 389 ] , [ 'bogus.example.com' , 389 ] ]
194+ @ldap . hosts = [ [ 'cert.mismatch.example.org ' , 389 ] , [ 'bogus.example.com' , 389 ] ]
195195 @ldap . encryption (
196196 method : :start_tls ,
197197 tls_options : { ca_file : CA_FILE } ,
0 commit comments