@@ -57,7 +57,7 @@ def test_bind_tls_with_bad_hostname_verify_none_no_ca_passes
57
57
end
58
58
59
59
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 '
61
61
@ldap . encryption (
62
62
method : :start_tls ,
63
63
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
67
67
end
68
68
69
69
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 '
71
71
@ldap . encryption (
72
72
method : :start_tls ,
73
73
tls_options : { verify_mode : OpenSSL ::SSL ::VERIFY_PEER ,
@@ -84,7 +84,7 @@ def test_bind_tls_with_bad_hostname_verify_peer_ca_fails
84
84
end
85
85
86
86
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 '
88
88
@ldap . encryption (
89
89
method : :start_tls ,
90
90
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
100
100
end
101
101
102
102
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 '
104
104
@ldap . encryption (
105
105
method : :start_tls ,
106
106
tls_options : { ca_file : CA_FILE } ,
@@ -138,7 +138,7 @@ def test_bind_tls_with_valid_hostname_just_verify_peer_ca_passes
138
138
end
139
139
140
140
def test_bind_tls_with_bogus_hostname_system_ca_fails
141
- @ldap . host = '127.0.0.1 '
141
+ @ldap . host = 'cert.mismatch.example.org '
142
142
@ldap . encryption ( method : :start_tls , tls_options : { } )
143
143
error = assert_raise Net ::LDAP ::Error ,
144
144
Net ::LDAP ::ConnectionRefusedError do
@@ -164,7 +164,7 @@ def test_bind_tls_with_multiple_hosts
164
164
165
165
def test_bind_tls_with_multiple_bogus_hosts
166
166
@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 ] ]
168
168
@ldap . encryption (
169
169
method : :start_tls ,
170
170
tls_options : TLS_OPTS . merge ( verify_mode : OpenSSL ::SSL ::VERIFY_PEER ,
@@ -180,7 +180,7 @@ def test_bind_tls_with_multiple_bogus_hosts
180
180
181
181
def test_bind_tls_with_multiple_bogus_hosts_no_verification
182
182
@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 ] ]
184
184
@ldap . encryption (
185
185
method : :start_tls ,
186
186
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
191
191
192
192
def test_bind_tls_with_multiple_bogus_hosts_ca_check_only_fails
193
193
@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 ] ]
195
195
@ldap . encryption (
196
196
method : :start_tls ,
197
197
tls_options : { ca_file : CA_FILE } ,
0 commit comments