Exception: Puppet::Forge::Errors::SSLVerifyError Private

Inherits:
ForgeError show all
Defined in:
lib/puppet/forge/errors.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This exception is raised when there is an SSL verification error when communicating with the forge.

Instance Attribute Summary

Attributes inherited from Error

#original

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ SSLVerifyError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SSLVerifyError.

Parameters:

  • options (Hash)

    a customizable set of options

Options Hash (options):

  • :uri (String)

    The URI that failed

  • :original (String)

    the original exception


24
25
26
27
28
29
# File 'lib/puppet/forge/errors.rb', line 24

def initialize(options)
  @uri     = options[:uri]
  original = options[:original]

  super(_("Unable to verify the SSL certificate at %{uri}") % { uri: @uri }, original)
end

Instance Method Details

#multilineString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return a multiline version of the error message

Returns:

  • (String)

    the multiline version of the error message


34
35
36
37
38
39
40
41
# File 'lib/puppet/forge/errors.rb', line 34

def multiline
  message = []
  message << _('Could not connect via HTTPS to %{uri}') % { uri: @uri }
  message << _('  Unable to verify the SSL certificate')
  message << _('    The certificate may not be signed by a valid CA')
  message << _('    The CA bundle included with OpenSSL may not be valid or up to date')
  message.join("\n")
end