Exception: Excon::Error::Certificate

Inherits:
Socket show all
Defined in:
lib/excon/error.rb

Overview

Certificate related errors

Instance Attribute Summary

Attributes inherited from Socket

#socket_error

Instance Method Summary collapse

Methods inherited from Excon::Error

status_error, status_errors

Constructor Details

#initialize(socket_error = Excon::Error.new) ⇒ Certificate

Returns a new instance of Certificate.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/excon/error.rb', line 28

def initialize(socket_error = Excon::Error.new)
  msg = "Unable to verify certificate. This may be an issue with the remote host or with Excon. Excon has certificates bundled, but these can be customized:\n\n      `Excon.defaults[:ssl_ca_path] = path_to_certs`\n      `ENV['SSL_CERT_DIR'] = path_to_certs`\n      `Excon.defaults[:ssl_ca_file] = path_to_file`\n      `ENV['SSL_CERT_FILE'] = path_to_file`\n      `Excon.defaults[:ssl_verify_callback] = callback`\n          (see OpenSSL::SSL::SSLContext#verify_callback)\nor:\n      `Excon.defaults[:ssl_verify_peer] = false` (less secure).\n  EOL\n  full_message = \"\#{socket_error.message} (\#{socket_error.class})\" +\n                 ' ' + msg\n  super(full_message)\n  set_backtrace(socket_error.backtrace)\n  @socket_error = socket_error\nend\n"