Class: Riak::Client::BeefcakeProtobuffsBackend::BeefcakeSocket::TlsInitiator Private
- Inherits:
-
Object
- Object
- Riak::Client::BeefcakeProtobuffsBackend::BeefcakeSocket::TlsInitiator
- Includes:
- Util::Translation
- Defined in:
- lib/riak/client/beefcake/socket.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wrap up the logic to turn a TCP socket into a TLS socket. Depends on Beefcake, which should be relatively safe.
Constant Summary collapse
- BC =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
::Riak::Client::BeefcakeProtobuffsBackend
Instance Method Summary collapse
-
#initialize(tcp_socket, host, authentication) ⇒ TlsInitiator
constructor
private
Create a TLS Initiator.
-
#tls_socket ⇒ OpenSSL::SSL::SSLSocket
private
Return the SSLSocket that has a TLS session running.
Methods included from Util::Translation
Constructor Details
#initialize(tcp_socket, host, authentication) ⇒ TlsInitiator
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a TLS Initiator
50 51 52 53 54 |
# File 'lib/riak/client/beefcake/socket.rb', line 50 def initialize(tcp_socket, host, authentication) @sock = @tcp = tcp_socket @host = host @auth = authentication end |
Instance Method Details
#tls_socket ⇒ OpenSSL::SSL::SSLSocket
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return the SSLSocket that has a TLS session running. (TLS is a better and safer SSL).
60 61 62 63 64 65 66 67 |
# File 'lib/riak/client/beefcake/socket.rb', line 60 def tls_socket configure_context start_tls validate_session send_authentication validate_connection return @tls end |