diff options
| author | Josh Cooper <josh@puppetlabs.com> | 2011-07-26 15:02:58 -0700 |
|---|---|---|
| committer | Josh Cooper <josh@puppetlabs.com> | 2011-07-26 15:02:58 -0700 |
| commit | 0506874ebeac8f2fb7d6c754ed6b606eab56d216 (patch) | |
| tree | 952a05f810643e0a510f76c43f04065e57f87957 /lib/puppet | |
| parent | 770e30d620271f988321ea45c108fb167ab55ad7 (diff) | |
| parent | d88923bb830336d7f5fc1e0809923e9a69126995 (diff) | |
| download | puppet-0506874ebeac8f2fb7d6c754ed6b606eab56d216.tar.gz puppet-0506874ebeac8f2fb7d6c754ed6b606eab56d216.tar.xz puppet-0506874ebeac8f2fb7d6c754ed6b606eab56d216.zip | |
Merge branch 'master' of github.com:puppetlabs/puppet
* 'master' of github.com:puppetlabs/puppet:
maint: Suggest where to start troubleshooting SSL error message
maint: Fix cert app to print help and exit if no subcommand
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/application/cert.rb | 3 | ||||
| -rw-r--r-- | lib/puppet/indirector/rest.rb | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/application/cert.rb b/lib/puppet/application/cert.rb index 162672b6a..330fba8bd 100644 --- a/lib/puppet/application/cert.rb +++ b/lib/puppet/application/cert.rb @@ -218,7 +218,8 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License if sub = self.command_line.args.shift then self.subcommand = sub else - help + puts help + exit end end result 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 |
