Rails 4 and Ruby 2 Net/HTTP SSL Request: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol -


this duplicate of:

ssl_connect returned=1 errno=0 state=sslv3 read server certificate b: certificate verify failed

but specific rails 4 , ruby 2 environment. figure appropriate make new question because solutions worked on machine previous environments no longer appear work after updates rails , ruby.

the problem

when making net/http ssl request tune of:

api_uri = uri("http://accounts.google.com/o/oauth2/token") https = net::http.new(api_uri.host, api_uri.port) https.use_ssl = true https.ca_file = '/usr/local/etc/openssl/cert.pem' if rails.env == "development" https.request_get(api_uri.path) 

i receive the

openssl::ssl::sslerror: ssl_connect returned=1 errno=0 state=sslv2/v3 read server hello a: unknown protocol 

error. i've tried out solutions in referenced question worked in previous environments, no avail.

try setting certificate in environment i.e env see

env['ssl_cert_file'] = "your certificate path" 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -