title: Chef remote_file from https site with self signed certificate
body: <p>I was wondering if Chef can use a <code>remote_file</code> resource form a https source that uses self signed certificate. It doesn't seem to be able to. Documentation does not mention certificates and offer configuration for disable SSL check.</p>
  
  <p>If you have a site with https with self signed certificate this can for example be reproduced with recipe that has</p>
  
  <pre><code>remote_file "/tmp/image.png" do
    source "https://mywebsite.com/image.png"
  end
  </code></pre>
  
  <p>You can of course use <code>knife</code> to fetch the certificate on the target node for example as follows</p>
  
  <blockquote>
    <p>vagrant@devops:~$ knife ssl fetch <a href="https://mywebsite.com/" rel="noreferrer">https://mywebsite.com/</a><br />
    WARNING: No knife configuration file found<br />
    WARNING: Certificates from mywebsite.com will be fetched and placed in your trusted_cert directory (/home/vagrant/.chef/trusted_certs).<br />
    Knife has no means to verify these are the correct certificates. You should
    verify the authenticity of these certificates after downloading.</p>
  </blockquote>
  
  <p>This doesn't seem to do much/anything. Chef will continue to show message</p>
  
  <blockquote>
    <p>==> default: [2015-06-08T06:30:33+00:00] ERROR: remote_file[/tmp/image.png] (jenkins::remote_file_test line 1) had an error: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed</p>
  </blockquote>
  
  <p>Maybe this is a bug? It seems that Chef is ignoring the trusted certs.</p>
  
  <p>Is there a workaround for this? Can we make Chef trust the cert somehow?</p>
  
  <p><strong>Update</strong>
  Correct answer was given by Tensibai. See his comment.</p>