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

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

Overview

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

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

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
  _(<<-EOS).chomp % { uri: @uri }
Could not connect via HTTPS to %{uri}
  Unable to verify the SSL certificate
The certificate may not be signed by a valid CA
The CA bundle included with OpenSSL may not be valid or up to date
  EOS
end