Fix SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
Set to verify none (run that bit of code before making the request or put this bit in an initializer)
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
UPDATE: Solution above works ok if you're just coding on development machine.. But for a far better solution (especially production servers), please follow this link: http://mislav.uniqpath.com/2013/07/ruby-openssl/
Written by Josh Teng
Related protips
6 Responses
Where shall I add this code to?!
simple solution check this out
Thank you!
Thank you very much.
I was facing this problem since 1 month.Thanks a lot
Add this line in the code
options = {
:username =>jiraUsrname,
:password =>jiraPwd,
:site => jiraUrlnew,
:contextpath => '',
:authtype => :basic,
:usessl => true,
:sslverifymode => OpenSSL::SSL::VERIFYNONE
}
:sslverifymode => OpenSSL::SSL::VERIFY_NONE this line of code fix this issue
This is a terrible idea and you should never do this.