Skip to content

Commit 76bc434

Browse files
committed
SSL - Add alpn_protocols to SSLContext attributes
1 parent 992d07c commit 76bc434

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/net/http.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def HTTP.socket_type #:nodoc: obsolete
595595
# _opt_ sets following values by its accessor.
596596
# The keys are ipaddr, ca_file, ca_path, cert, cert_store, ciphers, keep_alive_timeout,
597597
# close_on_empty_response, key, open_timeout, read_timeout, write_timeout, ssl_timeout,
598-
# ssl_version, use_ssl, verify_callback, verify_depth and verify_mode.
598+
# ssl_version, use_ssl, verify_callback, verify_depth, verify_mode and alpn_protocols.
599599
# If you set :use_ssl as true, you can use https and default value of
600600
# verify_mode is set as OpenSSL::SSL::VERIFY_PEER.
601601
#
@@ -886,6 +886,7 @@ def use_ssl=(flag)
886886
:@verify_depth,
887887
:@verify_mode,
888888
:@verify_hostname,
889+
:@alpn_protocols,
889890
]
890891
SSL_ATTRIBUTES = [
891892
:ca_file,
@@ -903,6 +904,7 @@ def use_ssl=(flag)
903904
:verify_depth,
904905
:verify_mode,
905906
:verify_hostname,
907+
:alpn_protocols,
906908
]
907909

908910
# Sets path of a CA certification file in PEM format.

0 commit comments

Comments
 (0)