aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@ruby-lang.org>2016-03-25 04:38:13 +0000
committerKazuki Yamaguchi <k@rhe.jp>2016-05-31 11:31:27 +0900
commit8a2328c6923a823f8a4b00e557728e4716825cc2 (patch)
tree1ae2401b6ff18e5db26603388f2929d5e80786d2 /test
parentf26a186d95478b8acdc8fc8253ee4e09616c3c06 (diff)
downloadruby-openssl-8a2328c6923a823f8a4b00e557728e4716825cc2.tar.gz
openssl: fix build when NPN is disabled by OpenSSL
* ext/openssl/extconf.rb: check SSL_CTX_set_next_proto_select_cb function rather than OPENSSL_NPN_NEGOTIATED macro. it exists even if it is disabled by OpenSSL configuration. [ruby-core:74384] [Bug #12182] * ext/openssl/ossl_ssl.c: update #ifdef(s) as above. * test/openssl/test_ssl.rb: skip NPN tests if NPN is disabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/test_ssl.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index cbffc981..7132dcc1 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
@@ -1064,7 +1064,9 @@ if OpenSSL::OPENSSL_VERSION_NUMBER >= 0x10002000
end
end
-if OpenSSL::OPENSSL_VERSION_NUMBER > 0x10001000
+if OpenSSL::OPENSSL_VERSION_NUMBER > 0x10001000 &&
+ OpenSSL::SSL::SSLContext.method_defined?(:npn_select_cb)
+ # NPN may be disabled by OpenSSL configure option
def test_npn_protocol_selection_ary
advertised = ["http/1.1", "spdy/2"]