Skip to content

Minor fixes to let's encrypt environment#355

Open
ayushn21 wants to merge 2 commits into
socketry:mainfrom
ayushn21:tls
Open

Minor fixes to let's encrypt environment#355
ayushn21 wants to merge 2 commits into
socketry:mainfrom
ayushn21:tls

Conversation

@ayushn21

Copy link
Copy Markdown
Contributor

I ran into a couple of issues trying to deploy a Rack app using Falcon Virtual secured with a Let's Encrypt certificate.

  1. The Falcon::Environment::TLS module needs to be separately included in addition to Falcon::Environment::LetsEncryptTLS.
service "service.example" do
  include Falcon::Environment::Rack
  include Falcon::Environment::TLS
  include Falcon::Environment::LetsEncryptTLS
end

I think this is a bit fiddly, and the docs don't mention this additional include anywhere. I've included the TLS module in the LetsEncryptTLS module so just a single include in the configuration is enough.

  1. I got the following error after issuing the certificate:

OpenSSL::PKey::PKeyError: incorrect pkey type: id-ecPublicKey

I fixed this by adding the below line to my config:

ssl_private_key { OpenSSL::PKey.read(File.read(ssl_private_key_path)) }

This PR changes the TLS environment to use OpenSSL::PKey.read to fix this issue.

Types of Changes

  • Bug fix.

Contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant