Module: RightSupport::Net::SSL
- Defined in:
- lib/right_support/net/ssl.rb,
lib/right_support/net/ssl/open_ssl_patch.rb
Defined Under Namespace
Modules: OpenSSLPatch
Class Method Summary collapse
Class Method Details
.expected_hostname ⇒ Object
17 18 19 |
# File 'lib/right_support/net/ssl.rb', line 17 def expected_hostname Thread.current[:right_support_net_ssl_expected_hostname] end |
.with_expected_hostname(hostname, &block) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/right_support/net/ssl.rb', line 21 def with_expected_hostname(hostname, &block) Thread.current[:right_support_net_ssl_expected_hostname] = hostname block.call rescue Exception => e Thread.current[:right_support_net_ssl_expected_hostname] = nil raise e ensure Thread.current[:right_support_net_ssl_expected_hostname] = nil end |