Skip to content

Commit 98d0763

Browse files
committed
Merge branch 'support-openssl-1-1-1'
Additional fixes to #217 to support OpenSSL 1.1.1.
2 parents cf5224c + 133487f commit 98d0763

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_ssl.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_add_certificate_multiple_certs
8181
add0_chain_supported = openssl?(1, 0, 2)
8282

8383
if add0_chain_supported
84-
ca2_key = Fixtures.pkey("rsa1024")
84+
ca2_key = Fixtures.pkey("rsa2048")
8585
ca2_exts = [
8686
["basicConstraints", "CA:TRUE", true],
8787
["keyUsage", "cRLSign, keyCertSign", true],
@@ -1361,7 +1361,12 @@ def test_fallback_scsv
13611361
# Server support better, so refuse the connection
13621362
sock1, sock2 = socketpair
13631363
begin
1364+
# This test is for the downgrade protection mechanism of TLS1.2.
1365+
# This is why ctx1 bounds max_version == TLS1.2.
1366+
# Otherwise, this test fails when using openssl 1.1.1 (or later) that supports TLS1.3.
1367+
# TODO: We may need another test for TLS1.3 because it seems to have a different mechanism.
13641368
ctx1 = OpenSSL::SSL::SSLContext.new
1369+
ctx1.max_version = OpenSSL::SSL::TLS1_2_VERSION
13651370
s1 = OpenSSL::SSL::SSLSocket.new(sock1, ctx1)
13661371

13671372
ctx2 = OpenSSL::SSL::SSLContext.new

0 commit comments

Comments
 (0)