# Ignore SSL errors when using the remote\_file resource

**URL:** <https://discourse.chef.io/t/ignore-ssl-errors-when-using-the-remote-file-resource/7183>\
**Category:** Chef Infra (archive)\
**Created:** [October 26, 2015, 4:19pm UTC](https://discourse.chef.io/t/ignore-ssl-errors-when-using-the-remote-file-resource/7183 "2015-10-26T16:19:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdoonan](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@kdoonan](https://discourse.chef.io/u/kdoonan)\
**Post date:** [October 26, 2015, 4:19pm UTC](https://discourse.chef.io/t/ignore-ssl-errors-when-using-the-remote-file-resource/7183/1 "2015-10-26T16:19:21Z")

</div>

Hey,

Is it possible to completely ignore SSL errors when using the remote\_file resource in a recipe? After doing some searching, I’ve found that you can append a self signed cert to /opt/chef/embedded/ssl/certs/cacert.pem to make it trusted, however sometimes there is a case when certificates are flat out wrong or outdated and it’d be good if I could ignore SSL errors completely in those scenarios.

```
remote_file 'https://someaddress.com/file.txt' do
  path "C:\file.txt"
  action :create
end

```

Running the above with a failing SSL cert ends with the following:

```
   [2015-10-26T06:40:14-07:00] ERROR: SSL Validation failure connecting to host: someaddress.com - SSL_connect returned=1 errno=0 state=error: certificate verify failed

       ================================================================================
       Error executing action `create` on resource 'remote_file[https://someaddress.com/file.txt]'
       ================================================================================

       OpenSSL::SSL::SSLError
       ----------------------
       SSL_connect returned=1 errno=0 state=error: certificate verify failed

   Running handlers:
   [2015-10-26T06:40:14-07:00] ERROR: Running exception handlers
   Running handlers complete
   [2015-10-26T06:40:14-07:00] ERROR: Exception handlers complete
   Chef Client failed. 1 resources updated in 18 seconds
   [2015-10-26T06:40:14-07:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
   [2015-10-26T06:40:14-07:00] FATAL: OpenSSL::SSL::SSLError: remote_file[https://someaddress.com/file.txt] (cookbook::windows line 50) had an error: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed

```

Thanks  
Kieran

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [October 26, 2015, 4:49pm UTC](https://discourse.chef.io/t/ignore-ssl-errors-when-using-the-remote-file-resource/7183/2 "2015-10-26T16:49:48Z")

</div>

> [@kdoonan](#):
>
> however sometimes there is a case when certificates are flat out wrong or outdated and it'd be good if I could ignore SSL errors completely in those scenarios.

Trying to ignore configuration/administration problems instead of fixing them sounds a bad practice to me.  
And I really see no way of configuring openssl in an insecure mode if the certificates are invalid (not self-signed).
