summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2015-11-03 13:20:47 -0800
committerdanielsdeleo <dan@chef.io>2015-11-04 08:34:00 -0800
commitc295a56484743c73310a12ad2cc2417f9f34aa17 (patch)
treed047fe5e0729a048235c93f556190ae145431999
parent6ca75bb1c67f9281531b72ec6fb95a655022d71a (diff)
downloadchef-c295a56484743c73310a12ad2cc2417f9f34aa17.tar.gz
Skip retries of certificate verification failures
-rw-r--r--lib/chef/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb
index 28bbef3828..c2bb58f88f 100644
--- a/lib/chef/http.rb
+++ b/lib/chef/http.rb
@@ -330,7 +330,7 @@ class Chef
end
raise Timeout::Error, "Timeout connecting to #{url}, giving up"
rescue OpenSSL::SSL::SSLError => e
- if http_retry_count - http_attempts + 1 > 0
+ if (http_retry_count - http_attempts + 1 > 0) && !e.message.include?("certificate verify failed")
Chef::Log.error("SSL Error connecting to #{url}, retry #{http_attempts}/#{http_retry_count}")
sleep(http_retry_delay)
retry