Class: Net::HTTP
- Inherits:
-
Object
- Object
- Net::HTTP
- Defined in:
- lib/openssl_patch.rb
Instance Method Summary collapse
Instance Method Details
#connect ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/openssl_patch.rb', line 55 def connect original_connect # Ensure SSL context uses our certificate file (skip if context is frozen, e.g. Bundler) if use_ssl? && @ssl_context && !@ssl_context.frozen? store = OpenSSL::X509::Store.new store.set_default_paths store.add_file(CERT_FILE) if CERT_FILE && File.exist?(CERT_FILE) @ssl_context.cert_store = store end end |
#original_connect ⇒ Object
53 |
# File 'lib/openssl_patch.rb', line 53 alias_method :original_connect, :connect |