OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=unknown state: unknown protocol

前端 未结 4 767
北荒
北荒 2020-12-05 15:43

I\'ve followed many posts regarding this issue and non of them helped. I\'m trying to connect using simplest irb commands:

require \'open-uri\'
open (\'https         


        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 16:25

    I found a good writeup of the problem & solution here. http://blog.55minutes.com/2012/05/tls-error-with-ruby-client-and-tomcat-server/

    TLDR code snippet that resolves the problem.

    http = Net::HTTP.new(host, port)
    http.use_ssl = true
    http.ssl_version = :SSLv3
    http.start { ... }
    

提交回复
热议问题