Method: Etcd::Client#setup_https

Defined in:
lib/etcd/client.rb

#setup_https(http) ⇒ Object



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/etcd/client.rb', line 117

def setup_https(http)
  http.use_ssl = use_ssl
  http.verify_mode = verify_mode
  if config.ssl_cert
    Log.debug('Setting up ssl cert')
    http.cert = config.ssl_cert
  end
  if config.ssl_key
    Log.debug('Setting up ssl key')
    http.key = config.ssl_key
  end
  if config.ca_file
    Log.debug('Setting up ssl ca file to :' + config.ca_file)
    http.ca_file = config.ca_file
  end
end