New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Puma does not load a CA when verification mode is set to :peer #1222
Comments
Looks like a bug. |
|
temporarily can be fixed by using bind instead of ssl_bind like this:
|
I'd also like to be able to set both ca and verify_mode (when not using Java as well). |
Still not working with https://github.com/puma/puma/blob/v3.12.0/lib/puma/dsl.rb#L286-L295 Lines 286 to 295 in f7e1e58
|
Can reproduce: # config.rb
key = File.expand_path "./certs/my_key.key"
cert = File.expand_path "./certs/my_cert.crt"
ca = File.expand_path "./certs/my_ca.crt"
ssl_bind "0.0.0.0", 9292, :ca => ca, :cert => cert, :key => key, :verify_mode => :peer I created three empty files for the certs and then run: bundle exec bin/puma -C config.rb test/rackup/hello.ru |
Steps to reproduce
Expected behavior
Puma should just start and accept TLS connections.
Actual behavior
Puma exits 1, requesting a CA be specified.
Why it's happening
If mode is set to verify a peer, it requests a CA:
puma/lib/puma/binder.rb
Line 178 in 0912b0c
However, the ssl bind method will not attach a CA param to the URL it generates:
https://github.com/puma/puma/blob/master/lib/puma/dsl.rb#L273
If this is a bug and not just me being dumb/wrong, I have no problem submitting a PR to fix it.
System configuration
Ruby version: ruby 2.3.1p112 (2016-04-26 revision 54768)
Rails version: rails (5.0.1)
The text was updated successfully, but these errors were encountered: