我目前使用下列选项在我的Rails应用程序启用HTTPS与使用WEBrick:如何配置WEBrick以通过HTTPS使用中间证书?
{
:Port => 3000,
:environment => (ENV['RAILS_ENV'] || "development").dup,
:daemonize => false,
:debugger => false,
:pid => File.expand_path("tmp/pids/server.pid"),
:config => File.expand_path("config.ru"),
:SSLEnable => true,
:SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
:SSLPrivateKey => OpenSSL::PKey::RSA.new(
File.open("certificates/https/key.pem").read),
:SSLCertificate => OpenSSL::X509::Certificate.new(
File.open("certificates/https/cert.pem").read),
:SSLCertName => [["CN", WEBrick::Utils::getservername]]
}
我怎么会去指定中间证书?
你不应该回答你自己的问题本身。你应该回答你自己的问题。 – 2012-04-21 13:39:12
看来上面的代码来自[此博客文章](https://www.altamiracorp.com/blog/employee-posts/configuring-webrick-to-use-ssl),对吗? – 2014-04-17 06:21:04
我想我是从WEBrick文档中提取的,这本身就是一个挑战。这是漂亮的锅炉板。虽然我不能评论@priteshj。 – 2014-04-17 15:45:47