lib/t2-server/net/parameters.rb in t2-server-0.9.1 vs lib/t2-server/net/parameters.rb in t2-server-0.9.2
- old
+ new
@@ -77,18 +77,22 @@
# Connection parameters with sensible defaults set for standard connections.
# If the connection is over SSL then the peer will be verified using the
# underlying OS's certificate store.
class DefaultConnectionParameters < ConnectionParameters
+ # Create connection parameters that are secure by default and verify the
+ # server that is being connected to.
def initialize
super
self[:verify_peer] = true
end
end
# Connection parameters that specifically turn off peer verification when
# using SSL.
class InsecureSSLConnectionParameters < ConnectionParameters
+ # Create connection parameters that are insecure by default and do not
+ # verify the server that is connected to.
def initialize
super
self[:verify_peer] = false
end
end