Sha256: 1ac5a1bc1381e60028303048b4a14cca9f1e70d08f54ae3ab606ac5253795467
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
# Copyright (c) 2009-2011 RightScale, Inc, All Rights Reserved Worldwide. # # THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE # AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use, # reproduction, modification, or disclosure of this program is # strictly prohibited. Any use of this program by an authorized # licensee is strictly subject to the terms and conditions, # including confidentiality obligations, set forth in the applicable # License Agreement between RightScale.com, Inc. and the licensee. require 'right_support/net/ssl/open_ssl_patch' module RightSupport::Net module SSL module_function def expected_hostname Thread.current[:right_support_net_ssl_expected_hostname] end 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 ensure Thread.current[:right_support_net_ssl_expected_hostname] = nil end end end RightSupport::Net::SSL::OpenSSLPatch.enable!
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
right_support-2.6.17 | lib/right_support/net/ssl.rb |
right_support-2.6.16 | lib/right_support/net/ssl.rb |
right_support-2.6.15 | lib/right_support/net/ssl.rb |