lib/localhost/authority.rb in localhost-1.1.0 vs lib/localhost/authority.rb in localhost-1.1.1

- old
+ new

@@ -96,23 +96,28 @@ context.key = self.key context.cert = self.certificate context.session_id_context = "localhost" - context.set_params( - verify_hostname: false, - ) + context.set_params + + if context.respond_to? :verify_hostname= + context.verify_hostname = false + end end end def client_context(*args) OpenSSL::SSL::SSLContext.new(*args).tap do |context| context.cert_store = self.store context.set_params( verify_mode: OpenSSL::SSL::VERIFY_PEER, - verify_hostname: false, ) + + if context.respond_to? :verify_hostname= + context.verify_hostname = false + end end end def load(path) if File.directory? path