diff options
author | Irving Popovetsky <irving@getchef.com> | 2015-05-04 16:42:13 -0700 |
---|---|---|
committer | Irving Popovetsky <irving@getchef.com> | 2015-05-04 16:42:13 -0700 |
commit | 1656fd7b8d34348541311e063192964ac014159d (patch) | |
tree | 9c032131f090d63d939e0ab086ce4f79a411fc0f | |
parent | 20559c2206c5a7f7e1512f6146593dc34a6101fc (diff) | |
download | chef-1656fd7b8d34348541311e063192964ac014159d.tar.gz |
Apply an SSL Policy to CookbookSiteStreamingUploader, fixing SSL errors uploading to private Supermarkets
-rw-r--r-- | lib/chef/cookbook_site_streaming_uploader.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/cookbook_site_streaming_uploader.rb b/lib/chef/cookbook_site_streaming_uploader.rb index 9e7a55c772..9961820156 100644 --- a/lib/chef/cookbook_site_streaming_uploader.rb +++ b/lib/chef/cookbook_site_streaming_uploader.rb @@ -22,6 +22,7 @@ require 'uri' require 'net/http' require 'mixlib/authentication/signedheaderauth' require 'openssl' +require 'chef/http/ssl_policies' class Chef # == Chef::CookbookSiteStreamingUploader @@ -106,7 +107,7 @@ class Chef url = URI.parse(to_url) - Chef::Log.logger.debug("Signing: method: #{http_verb}, path: #{url.path}, file: #{content_file}, User-id: #{user_id}, Timestamp: #{timestamp}") + Chef::Log.logger.debug("Signing: method: #{http_verb}, url: #{url}, file: #{content_file}, User-id: #{user_id}, Timestamp: #{timestamp}") # We use the body for signing the request if the file parameter # wasn't a valid file or wasn't included. Extract the body (with @@ -145,6 +146,7 @@ class Chef if url.scheme == "https" http.use_ssl = true http.verify_mode = verify_mode + Chef::HTTP::DefaultSSLPolicy.apply_to(http) end res = http.request(req) #res = http.start {|http_proc| http_proc.request(req) } |