aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-12-18 11:04:33 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-12-18 11:06:23 +0900
commit6becc12ef4e7235e749a92e3115b1155b39fc9e4 (patch)
tree32667184a70e9af1ccb5537092cf9a3ba24aac8a /lib
parentdcff9005d8c3a99b1d820f7f5891bc500b5e9bc6 (diff)
downloadplum-6becc12ef4e7235e749a92e3115b1155b39fc9e4.tar.gz
client: remove NPN support (Ruby 2.3.0 will be released soon)
Diffstat (limited to 'lib')
-rw-r--r--lib/plum/client.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/plum/client.rb b/lib/plum/client.rb
index 103d938..020b372 100644
--- a/lib/plum/client.rb
+++ b/lib/plum/client.rb
@@ -143,8 +143,7 @@ module Plum
@socket.connect
@socket.post_connection_check(@config[:hostname]) if ctx.verify_mode != OpenSSL::SSL::VERIFY_NONE
- @socket.respond_to?(:alpn_protocol) && @socket.alpn_protocol == "h2" ||
- @socket.respond_to?(:npn_protocol) && @socket.npn_protocol == "h2"
+ @socket.alpn_protocol == "h2"
end
end
@@ -176,14 +175,7 @@ module Plum
ctx.cert_store = cert_store
if @config[:http2]
ctx.ciphers = "ALL:!" + SSLSocketServerConnection::CIPHER_BLACKLIST.join(":!")
- if ctx.respond_to?(:alpn_protocols)
- ctx.alpn_protocols = ["h2", "http/1.1"]
- end
- if ctx.respond_to?(:npn_select_cb) # TODO: RFC 7540 does not define protocol negotiation with NPN
- ctx.npn_select_cb = -> protocols {
- protocols.include?("h2") ? "h2" : protocols.first
- }
- end
+ ctx.alpn_protocols = ["h2", "http/1.1"]
end
ctx
end