Skip to content
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

Only set ctx.ca iff there is a params['ca'] to set with. #819

Merged

Conversation

VictorLowther
Copy link
Contributor

ctx.ca does not deal well with being set to nil, which will be the case if
verify_mode is none and the ca param was not present in the bind line.

Specifically, you get this backtrace:

/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/minissl.rb:138:in exist?': no implicit conversion of nil into String (TypeError) from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/minissl.rb:138:inca='
from /gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/binder.rb:169:in block in parse' from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/binder.rb:84:ineach'
from /gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/binder.rb:84:in parse' from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/runner.rb:119:inload_and_bind'
from /gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/single.rb:79:in run' from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/cli.rb:215:inrun'
from /gems/ruby/2.1.0/gems/puma-2.15.0/bin/puma:10:in <top (required)>' from <path>/gems/ruby/2.1.0/bin/puma:23:inload'
from /gems/ruby/2.1.0/bin/puma:23:in `

'

ctx.ca does not deal well with being set to nil, which will be the case if
verify_mode is none and the ca param was not present in the bind line.

Specifically, you get this backtrace:

<path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/minissl.rb:138:in `exist?': no implicit conversion of nil into String (TypeError)
    from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/minissl.rb:138:in `ca='
    from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/binder.rb:169:in `block in parse'
    from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/binder.rb:84:in `each'
    from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/binder.rb:84:in `parse'
    from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/runner.rb:119:in `load_and_bind'
    from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/single.rb:79:in `run'
    from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/lib/puma/cli.rb:215:in `run'
    from <path>/gems/ruby/2.1.0/gems/puma-2.15.0/bin/puma:10:in `<top (required)>'
    from <path>/gems/ruby/2.1.0/bin/puma:23:in `load'
    from <path>/gems/ruby/2.1.0/bin/puma:23:in `<main>'
evanphx added a commit that referenced this pull request Nov 6, 2015
…eption

Only set ctx.ca iff there is a params['ca'] to set with.
@evanphx evanphx merged commit d2e4ce7 into puma:master Nov 6, 2015
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.

None yet

2 participants