Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

From switch to if/elsif/else in Server::SSL #124

Closed
digitalextremist opened this issue Dec 12, 2013 · 1 comment
Closed

From switch to if/elsif/else in Server::SSL #124

digitalextremist opened this issue Dec 12, 2013 · 1 comment
Milestone

Comments

@digitalextremist
Copy link
Member

Per @tarcieri comment at #121 (diff)

ssl_context.verify_mode =
  case
  when options.include?(:verify_mode) then options[:verify_mode]
  when options.include?(:ca_file)     then OpenSSL::SSL::VERIFY_PEER
  when options.include?(:ca_path)     then OpenSSL::SSL::VERIFY_PEER
  else                                     OpenSSL::SSL::VERIFY_NONE
  end

The above ought to be more idiomatic, and done with if/elsif/else approach.

@stouset, can you refactor that? I believe that came as part of your recent upgrades to what is now Server::SSL?

@digitalextremist
Copy link
Member Author

Released in 0.6.0.pre1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant