Skip to content

Commit 2475d94

Browse files
committed
Merge branch 'ky/fix-ssl-test-internal-encoding'
* ky/fix-ssl-test-internal-encoding: test/test_ssl: prevent changing default internal encoding
2 parents 70aad19 + 01445af commit 2475d94

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

test/test_ssl.rb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,8 @@ def test_get_ephemeral_key
13041304
end
13051305

13061306
def test_fallback_scsv
1307-
pend "Fallback SCSV is not supported" unless OpenSSL::SSL::SSLContext.method_defined?( :enable_fallback_scsv)
1307+
pend "Fallback SCSV is not supported" unless \
1308+
OpenSSL::SSL::SSLContext.method_defined?(:enable_fallback_scsv)
13081309

13091310
start_server do |port|
13101311
ctx = OpenSSL::SSL::SSLContext.new
@@ -1339,17 +1340,13 @@ def test_fallback_scsv
13391340
ctx2.enable_fallback_scsv
13401341
ctx2.max_version = OpenSSL::SSL::TLS1_1_VERSION
13411342
s2 = OpenSSL::SSL::SSLSocket.new(sock2, ctx2)
1342-
t = Thread.new {
1343-
assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) {
1344-
s2.connect
1345-
}
1346-
}
1347-
1343+
t = Thread.new { s2.connect }
13481344
assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) {
13491345
s1.accept
13501346
}
1351-
1352-
assert t.join
1347+
assert_raise_with_message(OpenSSL::SSL::SSLError, /inappropriate fallback/) {
1348+
t.join
1349+
}
13531350
ensure
13541351
sock1.close
13551352
sock2.close

0 commit comments

Comments
 (0)