How do I configure WEBrick to use an intermediate certificate with HTTPS?

前端 未结 2 1076
悲哀的现实
悲哀的现实 2021-01-11 21:01

I am currently using the following options in my Rails app to enable HTTPS with WEBrick:

{
    :Port => 3000,
    :environment => (ENV[\'RAILS_ENV\'] |         


        
2条回答
  •  天涯浪人
    2021-01-11 21:29

    I managed to find an answer after an extra hour of googling for keywords. Here is the option to define an intermediate certificate:

    :SSLExtraChainCert => [
        OpenSSL::X509::Certificate.new(
          File.open("certificates/intermediate.crt").read)]
    

    Note that the option requires an Array object, allowing to you include multiple certificates if needed.

提交回复
热议问题