@@ -394,7 +394,8 @@ def test_client_auth_success
394394 vflag = OpenSSL ::SSL ::VERIFY_PEER |OpenSSL ::SSL ::VERIFY_FAIL_IF_NO_PEER_CERT
395395 start_server ( verify_mode : vflag ,
396396 ctx_proc : proc { |ctx |
397- ctx . max_version = OpenSSL ::SSL ::TLS1_2_VERSION if libressl? ( 3 , 2 , 0 )
397+ # LibreSSL doesn't support client_cert_cb in TLS 1.3
398+ ctx . max_version = OpenSSL ::SSL ::TLS1_2_VERSION if libressl?
398399 } ) { |port |
399400 ctx = OpenSSL ::SSL ::SSLContext . new
400401 ctx . key = @cli_key
@@ -437,7 +438,7 @@ def test_client_cert_cb_ignore_error
437438 end
438439
439440 def test_client_ca
440- pend "LibreSSL 3.2 has broken client CA support" if libressl? ( 3 , 2 , 0 )
441+ pend "LibreSSL doesn't support certificate_authorities " if libressl?
441442
442443 ctx_proc = Proc . new do |ctx |
443444 ctx . client_ca = [ @ca_cert ]
@@ -609,12 +610,9 @@ def test_finished_messages
609610 start_server ( accept_proc : proc { |server |
610611 server_finished = server . finished_message
611612 server_peer_finished = server . peer_finished_message
612- } , ctx_proc : proc { |ctx |
613- ctx . max_version = OpenSSL ::SSL ::TLS1_2_VERSION if libressl? ( 3 , 2 , 0 )
614613 } ) { |port |
615614 ctx = OpenSSL ::SSL ::SSLContext . new
616615 ctx . verify_mode = OpenSSL ::SSL ::VERIFY_NONE
617- ctx . max_version = :TLS1_2 if libressl? ( 3 , 2 , 0 ) && !libressl? ( 3 , 3 , 0 )
618616 server_connect ( port , ctx ) { |ssl |
619617 ssl . puts "abc" ; ssl . gets
620618
@@ -798,7 +796,7 @@ def test_post_connection_check_wildcard_san
798796
799797 # LibreSSL 3.5.0+ doesn't support other wildcard certificates
800798 # (it isn't required to, as RFC states MAY, not MUST)
801- return if libressl? ( 3 , 5 , 0 )
799+ return if libressl?
802800
803801 assert_equal ( true , OpenSSL ::SSL . verify_certificate_identity (
804802 create_cert_with_san ( 'DNS:*baz.example.com' ) , 'foobaz.example.com' ) )
@@ -1078,7 +1076,7 @@ def test_accept_errors_include_peeraddr
10781076 def test_verify_hostname_on_connect
10791077 ctx_proc = proc { |ctx |
10801078 san = "DNS:a.example.com,DNS:*.b.example.com"
1081- san += ",DNS:c*.example.com,DNS:d.*.example.com" unless libressl? ( 3 , 2 , 2 )
1079+ san += ",DNS:c*.example.com,DNS:d.*.example.com" unless libressl?
10821080 exts = [
10831081 [ "keyUsage" , "keyEncipherment,digitalSignature" , true ] ,
10841082 [ "subjectAltName" , san ] ,
@@ -1105,7 +1103,7 @@ def test_verify_hostname_on_connect
11051103 [ "cx.example.com" , true ] ,
11061104 [ "d.x.example.com" , false ] ,
11071105 ] . each do |name , expected_ok |
1108- next if name . start_with? ( 'cx' ) if libressl? ( 3 , 2 , 2 )
1106+ next if name . start_with? ( 'cx' ) if libressl?
11091107 begin
11101108 sock = TCPSocket . new ( "127.0.0.1" , port )
11111109 ssl = OpenSSL ::SSL ::SSLSocket . new ( sock , ctx )
@@ -1388,8 +1386,7 @@ def test_options_disable_versions
13881386 supported = check_supported_protocol_versions
13891387 if !defined? ( OpenSSL ::SSL ::TLS1_3_VERSION ) ||
13901388 !supported . include? ( OpenSSL ::SSL ::TLS1_2_VERSION ) ||
1391- !supported . include? ( OpenSSL ::SSL ::TLS1_3_VERSION ) ||
1392- !defined? ( OpenSSL ::SSL ::OP_NO_TLSv1_3 ) # LibreSSL < 3.4
1389+ !supported . include? ( OpenSSL ::SSL ::TLS1_3_VERSION )
13931390 pend "this test case requires both TLS 1.2 and TLS 1.3 to be supported " \
13941391 "and enabled by default"
13951392 end
@@ -1743,11 +1740,7 @@ def test_ciphersuites_method_tls_connection
17431740
17441741 server_connect ( port , cli_ctx ) do |ssl |
17451742 assert_equal ( 'TLSv1.3' , ssl . ssl_version )
1746- if libressl? ( 3 , 4 , 0 ) && !libressl? ( 3 , 5 , 0 )
1747- assert_equal ( "AEAD-AES128-GCM-SHA256" , ssl . cipher [ 0 ] )
1748- else
1749- assert_equal ( csuite [ 0 ] , ssl . cipher [ 0 ] )
1750- end
1743+ assert_equal ( csuite [ 0 ] , ssl . cipher [ 0 ] )
17511744 ssl . puts ( 'abc' ) ; assert_equal ( "abc\n " , ssl . gets )
17521745 end
17531746 end
0 commit comments