diff options
-rw-r--r-- | lib/puppet/network/xmlrpc/client.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb index f6a5e8db6..b55511871 100644 --- a/lib/puppet/network/xmlrpc/client.rb +++ b/lib/puppet/network/xmlrpc/client.rb @@ -48,7 +48,11 @@ module Puppet::Network Puppet.warning "Transient SSL write error; restarting connection and retrying" self.recycle_connection retry - end + elsif detail.message =~ /certificate verify failed/ || /hostname was not match/ || /hostname not match/ + Puppet.warning "Certificate verification failed; consider using the certname configuration option" + self.recycle_connection + retry + end raise XMLRPCClientError, "Certificates were not trusted: %s" % detail rescue ::XMLRPC::FaultException => detail |