ubl6iw
Last Updated: August 20, 2018
·
54.77K
· joshteng

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/

7 Responses
Add your response

17427

Where shall I add this code to?!

over 1 year ago ·
17924
over 1 year ago ·
21403

Thank you!

over 1 year ago ·
24609

Thank you very much.
I was facing this problem since 1 month.Thanks a lot

over 1 year ago ·
28789

Add this line in the code

options = {
:username =>jiraUsrname,
:password =>jiraPwd,
:site => jiraUrlnew,
:contextpath => '',
:auth
type => :basic,
:usessl => true,
:ssl
verifymode => OpenSSL::SSL::VERIFYNONE
}
:sslverifymode => OpenSSL::SSL::VERIFY_NONE this line of code fix this issue

over 1 year ago ·
29403

This is a terrible idea and you should never do this.

11 months ago ·
30408

Your article is very good. I would love to read your post. It helps my work a lot.
http://run-3.online

about 1 month ago ·