1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Support passing JRuby keystore info in ssl_bind DSL

This commit is contained in:
YuriSolovyov 2015-12-01 19:27:27 +03:00 committed by YurySolovyov
parent 81c2ccb6d4
commit c28b48ff57

View file

@ -140,7 +140,12 @@ module Puma
end
def ssl_bind(host, port, opts)
@options[:binds] << "ssl://#{host}:#{port}?cert=#{opts[:cert]}&key=#{opts[:key]}"
if defined?(JRUBY_VERSION)
keystore_additions = "keystore=#{opts[:keystore]}&keystore-pass=#{opts[:keystore_pass]}"
@options[:binds] << "ssl://#{host}:#{port}?cert=#{opts[:cert]}&key=#{opts[:key]}&#{keystore_additions}"
else
@options[:binds] << "ssl://#{host}:#{port}?cert=#{opts[:cert]}&key=#{opts[:key]}"
end
end
# Use +path+ as the file to store the server info state. This is