to_io

to_io() Instance Public methods

new

SSLSocket.new(io) => aSSLSocketSSLSocket.new(io, ctx) => aSSLSocket Class Public methods Creates a new SSL socket from io which must be a real ruby object (not an IO-like object that responds to read/write. If ctx is provided the SSL Sockets initial params will be taken from the context. The OpenSSL::Buffering module provides additional IO methods. This method will freeze the SSLContext if one is provided; however, session management is still allowed in the frozen SSLContext

accept

ssl.accept => self Instance Public methods Waits for a SSL/TLS client to initiate a handshake. The handshake may be started after unencrypted data has been sent over the socket.

accept_nonblock

ssl.accept_nonblock => self Instance Public methods Initiates the SSL/TLS handshake as a server in non-blocking manner. # emulates blocking accept begin ssl.accept_nonblock rescue IO::WaitReadable IO.select([s2]) retry rescue IO::WaitWritable IO.select(nil, [s2]) retry end

cert

ssl.cert => cert or nil Instance Public methods The X509 certificate for this socket endpoint.

cipher

ssl.cipher => [name, version, bits, alg_bits] Instance Public methods The cipher being used for the current connection

client_ca

ssl.client_ca => [x509name, ...] Instance Public methods Returns the list of client CAs. Please note that in contrast to OpenSSL::SSL::SSLContext#client_ca no array of X509::Certificate is returned but X509::Name instances of the CA's subject distinguished name. In server mode, returns the list set by OpenSSL::SSL::SSLContext#client_ca. In client mode, returns the list of client CAs sent from the server.

connect

ssl.connect => self Instance Public methods Initiates an SSL/TLS handshake with a server. The handshake may be started after unencrypted data has been sent over the socket.

connect_nonblock

ssl.connect_nonblock => self Instance Public methods Initiates the SSL/TLS handshake as a client in non-blocking manner. # emulates blocking connect begin ssl.connect_nonblock rescue IO::WaitReadable IO.select([s2]) retry rescue IO::WaitWritable IO.select(nil, [s2]) retry end

npn_protocol

ssl.npn_protocol => String Instance Public methods Returns the protocol string that was finally selected by the client during the handshake.