Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/epp/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Server
include LibXML::XML
include RequiresParameters

attr_accessor :tag, :password, :server, :port, :lang, :services, :extensions, :version
attr_accessor :tag, :password, :server, :port, :lang, :services, :extensions, :version, :context

# ==== Required Attrbiutes
#
Expand All @@ -29,6 +29,7 @@ def initialize(attributes = {})
@services = attributes[:services] || ["urn:ietf:params:xml:ns:domain-1.0", "urn:ietf:params:xml:ns:contact-1.0", "urn:ietf:params:xml:ns:host-1.0"]
@extensions = attributes[:extensions] || []
@version = attributes[:version] || "1.0"
@context = attributes[:context] || nil

@logged_in = false
end
Expand Down Expand Up @@ -77,7 +78,7 @@ def send_request(xml)
# server upon connection.
def open_connection
@connection = TCPSocket.new(server, port)
@socket = OpenSSL::SSL::SSLSocket.new(@connection) if @connection
@socket = OpenSSL::SSL::SSLSocket.new(*[@connection, @context].compact) if @connection

@socket.sync_close = true
@socket.connect
Expand Down