1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/lib/puma
Julian Langschaedel e8d25b30f3 ssl: Add Client Side Certificate Auth
Add Client Side Certificate Auth feature and handling to puma's MiniSSL. Also exposes SSL errors to puma/apps.

 compatibility notes: MRI only

 shell example:

   puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&ca=path_to_ca&verify_mode=force_peer'

 code example: (examples/client_side_ssl)

    app = proc {|env| p env['puma.peercert']; [200, {}, ["hey"]] }

    events = SSLEvents.new($stdout, $stderr)
    server = Puma::Server.new(app, events)

    admin_context             = Puma::MiniSSL::Context.new
    admin_context.key         = KEY_PATH
    admin_context.cert        = CERT_PATH
    admin_context.ca          = CA_CERT_PATH
    admin_context.verify_mode = Puma::MiniSSL::VERIFY_PEER | Puma::MiniSSL::VERIFY_FAIL_IF_NO_PEER_CERT

    server.add_ssl_listener("0.0.0.0", ADMIN_PORT, admin_context)
    server.min_threads = MIN_THREADS
    server.max_threads = MAX_THREADS
    server.persistent_timeout = IDLE_TIMEOUT
    server.run.join

 additional credits: Andy Alness <andy.alness@gmail.com>
2015-06-06 23:15:00 +02:00
..
app Add reload_worker_directory 2014-02-25 14:52:20 +01:00
accept_nonblock.rb Vastly improve IO perf on 1.9.3 2012-08-11 15:09:09 -07:00
binder.rb ssl: Add Client Side Certificate Auth 2015-06-06 23:15:00 +02:00
capistrano.rb fallback from phased restart to start when not started 2014-04-10 12:35:00 +04:00
cli.rb refactor configuration 2015-03-14 22:59:21 -07:00
client.rb Be sure to unlink tempfiles after a request. Fixes #690 2015-04-21 09:48:13 -06:00
cluster.rb Add on_worker_fork hook, which allows to mimic Unicorn's behavior: 2015-03-07 12:09:39 +02:00
compat.rb Fix String#byteslice for Ruby 1.9.1, 1.9.2 2013-09-30 22:30:20 +09:00
configuration.rb Require Rack::Builder 2015-05-05 15:06:30 +03:00
const.rb ssl: Add Client Side Certificate Auth 2015-06-06 23:15:00 +02:00
control_cli.rb Add reload_worker_directory 2014-02-25 14:52:20 +01:00
daemon_ext.rb Keep STDOUT/STDERR the right mode. Fixes #422 2013-12-05 09:51:39 -08:00
delegation.rb Standardize "block" usage 2013-07-03 09:25:48 -05:00
detect.rb Cleanup the JRuby specific fix 2012-08-10 19:36:01 -07:00
dsl.rb Fix the Config constants not being available in the DSL. Fixes #683 2015-04-11 13:12:27 -07:00
events.rb ssl: Add Client Side Certificate Auth 2015-06-06 23:15:00 +02:00
io_buffer.rb Conditionalize the jruby IOBuffer 2012-08-11 22:14:52 -07:00
java_io_buffer.rb Conditionalize the jruby IOBuffer 2012-08-11 22:14:52 -07:00
jruby_restart.rb Keep jruby daemon mode from retrying on a hot restart 2013-08-13 16:05:51 -07:00
minissl.rb ssl: Add Client Side Certificate Auth 2015-06-06 23:15:00 +02:00
null_io.rb Remove StringIO dependency from NullIO 2012-04-30 14:55:16 -04:00
rack_default.rb Default Rack handler helper 2013-02-09 20:27:05 -08:00
rack_patch.rb Improve the logging output when hijack is used. Fixes #332 2013-07-18 12:55:40 -07:00
reactor.rb ssl: Add Client Side Certificate Auth 2015-06-06 23:15:00 +02:00
runner.rb better error logging during startup 2014-09-16 09:29:31 -04:00
server.rb ssl: Add Client Side Certificate Auth 2015-06-06 23:15:00 +02:00
single.rb redirect io right after daemonizing so startup errors are shown. Fixes #359 2014-12-12 17:52:15 -08:00
tcp_logger.rb Add experimental tcp mode (aka lopez express mode) 2013-08-07 16:39:08 -07:00
thread_pool.rb Oops! These changes should not have been committed to the pull request. 2015-01-20 14:23:22 +01:00
util.rb Add missing file 2013-02-04 22:39:19 -08:00