Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL certificate not working on rails local after upgrading to Chrome 73

SSL certificate not working in rails local after upgrading chrome to chrome 73. It was working fine till chrome 70 and the latest version of safari. Using this link to set up the ssl cert on local https://gist.github.com/jed/6147872

Rails 5.2.2.1 Ruby 2.6.1

The error coming on chrome 73 is:

2019-04-22 13:34:07 +0530: SSL error, peer: 127.0.0.1, peer cert: , #<Puma::MiniSSL::SSLError: OpenSSL error: error:141F7065:SSL routines:final_key_share:no suitable key share - 337604709>
like image 489
Siddhant Avatar asked Apr 22 '19 06:04

Siddhant


1 Answers

I had the same error with Rails 5.2.3 and ruby 2.6.3p62, puma 3.12.4. I was trying to use a self-signed SSL certificate in my development environment, as instructed in this link. I generated the key and cert with:

openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt

and then launched the server (puma in my case) with:

rails s -b 'ssl://localhost:3000?key=localhost.key&cert=localhost.crt'

but I was getting this error:

SSL error, peer: 172.23.0.1, peer cert: , #<Puma::MiniSSL::SSLError: OpenSSL error: error:141F7065:SSL routines:final_key_share:no suitable key share - 337604709>

I found a workaround in this puma issue. I uninstalled the current puma gem:

gem uninstall puma

and replaced in my gemfile:

gem 'puma', '~> 4.3' #'~> 3.11'
#gem 'puma', git: 'https://github.com/eric-norcross/puma.git', branch: 'chrome_70_ssl_curve_compatiblity'

finally

bundle install

and it started to work. The commented puma gem from github also worked but gave me problems with websockets over ssl.

like image 189
user2553863 Avatar answered Oct 13 '22 09:10

user2553863