Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

Changes to --cert_chain_file param #89

Merged
merged 1 commit into from
Apr 29, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
*.swl
.rbx/
*.rdb
.idea
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Slanger supports several configuration options, which can be supplied as command

-b or --webhook_url URL for webhooks. This argument is optional, if given webhook callbacks will be made http://pusher.com/docs/webhooks

-c or --cert_chain_file Certificate chain file or the Certificate file for SSL support. This argument is optional, if given, SSL will be enabled
-c or --cert_file Certificate file for SSL support. This argument is optional, if given, SSL will be enabled

-v or --[no-]verbose This makes Slanger run verbosely, meaning WebSocket frames will be echoed to STDOUT. Useful for debugging
</pre>
Expand Down
4 changes: 2 additions & 2 deletions bin/slanger
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ OptionParser.new do |opts|
options[:webhook_url] = p
end

opts.on '-c', '--cert_chain_file FILE', "Certificate chain file for SSL transport" do |p|
opts.on '-c', '--cert_file FILE', "Certificate file for SSL transport" do |p|
options[:tls_options] ||= {}
options[:tls_options][:cert_chain_file] = p
end
Expand All @@ -76,7 +76,7 @@ end
if options[:tls_options]
[:cert_chain_file, :private_key_file].each do |param|
raise RuntimeError.new "--#{param} does not exist at `#{options[:tls_options][param]}`" unless File.exists? options[:tls_options][param]
raise RuntimeError.new "Both --cert_chain_file and --private_key_file need to be specified" unless options[:tls_options][param]
raise RuntimeError.new "Both --cert_file and --private_key_file need to be specified" unless options[:tls_options][param]
end
end

Expand Down