Module: Coolio::SSL
- Defined in:
- lib/cool.io/http/ssl.rb
Instance Method Summary collapse
- #ssl? ⇒ Boolean
- #ssl_client_start ⇒ Object
- #ssl_completed? ⇒ Boolean
- #ssl_context ⇒ Object
- #ssl_server_start ⇒ Object
- #ssl_socket ⇒ Object
Instance Method Details
#ssl? ⇒ Boolean
6 7 8 |
# File 'lib/cool.io/http/ssl.rb', line 6 def ssl? true end |
#ssl_client_start ⇒ Object
30 31 32 33 |
# File 'lib/cool.io/http/ssl.rb', line 30 def ssl_client_start @ssl_method = :connect_nonblock ssl_init end |
#ssl_completed? ⇒ Boolean
26 27 28 |
# File 'lib/cool.io/http/ssl.rb', line 26 def ssl_completed? !!!@ssl_method end |
#ssl_context ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/cool.io/http/ssl.rb', line 18 def ssl_context @ssl_context ||= begin c = OpenSSL::SSL::SSLContext.new # c.verify_mode = OpenSSL::SSL::VERIFY_NONE c end end |
#ssl_server_start ⇒ Object
35 36 37 38 |
# File 'lib/cool.io/http/ssl.rb', line 35 def ssl_server_start @ssl_method = :accept_nonblock ssl_init end |
#ssl_socket ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/cool.io/http/ssl.rb', line 10 def ssl_socket @ssl_scoket ||= begin s = OpenSSL::SSL::SSLSocket.new(@_io, ssl_context) s.sync_close = true s end end |