Skip to content

Commit a2ed156

Browse files
committed
test/test_ssl: do not run NPN tests for LibreSSL >= 2.6.1
Similar to the previous one, LibreSSL 2.6.1 has relevant functions such as SSL_CTX_set_next_proto_select_cb(), but they are broken and do nothing.
1 parent b7591c2 commit a2ed156

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/test_ssl.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ def test_npn_protocol_selection_ary
911911
pend "TLS 1.2 is not supported" unless tls12_supported?
912912
pend "NPN is not supported" unless \
913913
OpenSSL::SSL::SSLContext.method_defined?(:npn_select_cb)
914+
pend "LibreSSL 2.6 has broken NPN functions" if libressl?(2, 6, 1)
914915

915916
advertised = ["http/1.1", "spdy/2"]
916917
ctx_proc = proc { |ctx| ctx.npn_protocols = advertised }
@@ -931,6 +932,7 @@ def test_npn_protocol_selection_enum
931932
pend "TLS 1.2 is not supported" unless tls12_supported?
932933
pend "NPN is not supported" unless \
933934
OpenSSL::SSL::SSLContext.method_defined?(:npn_select_cb)
935+
pend "LibreSSL 2.6 has broken NPN functions" if libressl?(2, 6, 1)
934936

935937
advertised = Object.new
936938
def advertised.each
@@ -955,6 +957,7 @@ def test_npn_protocol_selection_cancel
955957
pend "TLS 1.2 is not supported" unless tls12_supported?
956958
pend "NPN is not supported" unless \
957959
OpenSSL::SSL::SSLContext.method_defined?(:npn_select_cb)
960+
pend "LibreSSL 2.6 has broken NPN functions" if libressl?(2, 6, 1)
958961

959962
ctx_proc = Proc.new { |ctx| ctx.npn_protocols = ["http/1.1"] }
960963
start_server_version(:TLSv1_2, ctx_proc) { |port|
@@ -968,6 +971,7 @@ def test_npn_advertised_protocol_too_long
968971
pend "TLS 1.2 is not supported" unless tls12_supported?
969972
pend "NPN is not supported" unless \
970973
OpenSSL::SSL::SSLContext.method_defined?(:npn_select_cb)
974+
pend "LibreSSL 2.6 has broken NPN functions" if libressl?(2, 6, 1)
971975

972976
ctx_proc = Proc.new { |ctx| ctx.npn_protocols = ["a" * 256] }
973977
start_server_version(:TLSv1_2, ctx_proc) { |port|
@@ -981,6 +985,7 @@ def test_npn_selected_protocol_too_long
981985
pend "TLS 1.2 is not supported" unless tls12_supported?
982986
pend "NPN is not supported" unless \
983987
OpenSSL::SSL::SSLContext.method_defined?(:npn_select_cb)
988+
pend "LibreSSL 2.6 has broken NPN functions" if libressl?(2, 6, 1)
984989

985990
ctx_proc = Proc.new { |ctx| ctx.npn_protocols = ["http/1.1"] }
986991
start_server_version(:TLSv1_2, ctx_proc) { |port|

0 commit comments

Comments
 (0)