summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-07-26 12:57:40 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-07-26 12:57:40 -0700
commitdd97d7b054df5dd1d36f32387ddf30afeefad769 (patch)
tree0b014e631e95b1de40a5d015db724e4715c124e3 /lib/puppet
parent8baa4897e777f9515dc1663317f432ace3067bae (diff)
parent1d4acb5afda61b1f2c05223afff19c68248a3996 (diff)
downloadpuppet-dd97d7b054df5dd1d36f32387ddf30afeefad769.tar.gz
puppet-dd97d7b054df5dd1d36f32387ddf30afeefad769.tar.xz
puppet-dd97d7b054df5dd1d36f32387ddf30afeefad769.zip
Merge branch 'ticket/2.7.x/maint-improve_ssl_error' into 2.7.x
* ticket/2.7.x/maint-improve_ssl_error: maint: Suggest where to start troubleshooting SSL error message
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/indirector/rest.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/indirector/rest.rb b/lib/puppet/indirector/rest.rb
index 8018fe8e3..19daff51d 100644
--- a/lib/puppet/indirector/rest.rb
+++ b/lib/puppet/indirector/rest.rb
@@ -93,7 +93,9 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
http_connection.send(method, *args)
rescue OpenSSL::SSL::SSLError => error
- if error.message.include? "hostname was not match"
+ if error.message.include? "certificate verify failed"
+ raise Puppet::Error, "#{error.message}. This is often because the time is out of sync on the server or client"
+ elsif error.message.include? "hostname was not match"
raise unless cert = peer_certs.find { |c| c.name !~ /^puppet ca/i }
valid_certnames = [cert.name, *cert.alternate_names].uniq