class T2Server::CustomCASSLConnectionParameters

Connection parameters that simplify setting up verification of servers with “self-signed” or non-standard certificates.

Public Class Methods

new(path) → CustomCASSLConnectionParameters click to toggle source

path can either be a directory where the required certificate is stored or the path to the certificate file itself.

# File lib/t2-server/net/parameters.rb, line 109
def initialize(path)
  super

  case path
  when String
    self[:ca_path] = path if File.directory? path
    self[:ca_file] = path if File.file? path
  when File
    self[:ca_file] = path.path
  when Dir
    self[:ca_path] = path.path
  end
end