3
我怎樣才能通過Handsoap和jiraSOAP時加載指定網/ HTTP不驗證SSL證書..請參見下面的代碼:紅寶石jiraSOAP淨HTTP SSL驗證
require 'jiraSOAP'
Handsoap.http_driver = :net_http
api = JIRA::JIRAService.new jira_url
api.login(jira_user,jira_pwd)
我知道我需要這個地方:OpenSSL::SSL::VERIFY_NONE
錯誤如下:
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
from /usr/local/lib/ruby/1.9.1/net/http.rb:678:in `connect'
from /usr/local/lib/ruby/1.9.1/net/http.rb:678:in `block in connect'
from /usr/local/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
from /usr/local/lib/ruby/1.9.1/timeout.rb:89:in `timeout'
from /usr/local/lib/ruby/1.9.1/net/http.rb:678:in `connect'
from /usr/local/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
from /usr/local/lib/ruby/1.9.1/net/http.rb:626:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/handsoap-1.1.8/lib/handsoap/http/drivers/net_http_driver.rb:53:in `send_http_request'
from /usr/local/lib/ruby/gems/1.9.1/gems/handsoap-1.1.8/lib/handsoap/service.rb:249:in `invoke'
from /usr/local/lib/ruby/gems/1.9.1/gems/jiraSOAP-0.10.3/lib/jiraSOAP/api.rb:55:in `build'
from /usr/local/lib/ruby/gems/1.9.1/gems/jiraSOAP-0.10.3/lib/jiraSOAP/api.rb:69:in `soap_call'
from /usr/local/lib/ruby/gems/1.9.1/gems/jiraSOAP-0.10.3/lib/jiraSOAP/api.rb:18:in `login'
我做了一個黑客在/usr/local/lib/ruby/gems/1.9.1/gems/handsoap-1.1.8/lib/handsoap/http/drivers/net_http_driver.rb:39並補充說: http_client.verify_mode = OpenSSL :: SSL :: VERIFY_NONE,但這是不正確的。 – nictrix
嘿尼克 - 你能成功解決這個問題嗎?我也有同樣的問題。我的1.9.1無法驗證JIRA的證書。沒有很多人知道這個問題。 –