summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/client.rb2
-rw-r--r--lib/chef/config.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 77f63671d7..9fe45b77df 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -530,7 +530,7 @@ class Chef
end
def check_ssl_config
- if Chef::Config[:ssl_verify_mode] == :verify_none and !Chef::Config[:verify_api_cert]
+ if Chef::Config[:ssl_verify_mode] == :verify_none and !Chef::Config[:verify_api_cert] and !Chef::Config[:suppress_ssl_warnings]
Chef::Log.warn(<<-WARN)
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/lib/chef/config.rb b/lib/chef/config.rb
index 453a8f83da..f65b9a010f 100644
--- a/lib/chef/config.rb
+++ b/lib/chef/config.rb
@@ -352,6 +352,8 @@ class Chef
# be validated.
default :ssl_verify_mode, :verify_peer
+ default :suppress_ssl_warnings, false
+
# Whether or not to verify the SSL cert for HTTPS requests to the Chef
# server API. If set to `true`, the server's cert will be validated
# regardless of the :ssl_verify_mode setting. This is set to `true` when