gpt4 book ai didi

ruby-on-rails - 升级到 Chrome 73 后,SSL 证书在本地 Rails 上不起作用

转载 作者:行者123 更新时间:2023-12-03 21:19:30 24 4
gpt4 key购买 nike

将 chrome 升级到 chrome 73 后,SSL 证书在本地 Rails 中不起作用。在 chrome 70 和最新版本的 safari 之前它工作正常。使用此链接在本地设置 ssl 证书 https://gist.github.com/jed/6147872

rails 5.2.2.1
ruby 2.6.1

chrome 73 出现的错误是:

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>

最佳答案

我对 Rails 5.2.3 和 ruby​​ 2.6.3p62、puma 3.12.4 有同样的错误。我试图在我的开发环境中使用自签名 SSL 证书,如 this link 中的说明。 .我生成了 key 和证书:

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

然后使用以下命令启动服务器(在我的情况下为 puma):
rails s -b 'ssl://localhost:3000?key=localhost.key&cert=localhost.crt'

但我收到了这个错误:
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>

我在 this puma issue 中找到了解决方法.我卸载了当前的 puma gem:
gem uninstall puma

并在我的 gemfile 中替换:
gem 'puma', '~> 4.3' #'~> 3.11'
#gem 'puma', git: 'https://github.com/eric-norcross/puma.git', branch: 'chrome_70_ssl_curve_compatiblity'

最后
bundle install

它开始起作用了。来自 github 的评论 puma gem 也有效,但给了我使用 websockets over ssl 的问题。

关于ruby-on-rails - 升级到 Chrome 73 后,SSL 证书在本地 Rails 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55790150/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com