class Pantry::Communication::Security::CurveSecurity::Client
Client-side handling of Curve encryption.
Public Class Methods
new()
click to toggle source
# File lib/pantry/communication/security/curve_security.rb, line 25 def initialize @key_store = CurveKeyStore.new("client_keys") Pantry.logger.info("Configuring Client to use Curve encryption") end
Public Instance Methods
configure_socket(socket)
click to toggle source
# File lib/pantry/communication/security/curve_security.rb, line 30 def configure_socket(socket) socket.set(::ZMQ::CURVE_SERVERKEY, @key_store.server_public_key) socket.set(::ZMQ::CURVE_PUBLICKEY, @key_store.public_key) socket.set(::ZMQ::CURVE_SECRETKEY, @key_store.private_key) end