You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to configure the client to run within a Chef run using an internal CA issued certificate. To do this I must set the environment variable SSL_CERT_FILE but I can't seem to get this environment variable to be present during a Chef run. While I know its not really an issue that is unique to this particular gem I was hoping since the Chef team supports this gem you would have some insight into using it within a Chef run.
The specific error I receive is the following: OpenSSL::SSL::SSLError ---------------------- SSL_connect returned=1 errno=0 state=error: certificate verify failed
Which is resolved by flipping ssl_verify=false
This is the first time I have come across needing an environment variable in a Chef run and its proved to be very difficult. I have tried exporting it in /etc/profile and /etc/bash.bashrc - I've tried a Ruby ENV variable within the run (wrapped in a ruby block also) - I've tried both the "magic_shell" and "bash" cookbooks to set it but nothing seems to set the environment variable. I have also placed the cert in question in "/etc/chef/trusted_certs/" which I thought was akin to placing a cert in the "ssl" directory in a normal Ruby installation, making Chef's embedded Ruby aware of this cert during the run. I've also added the cert to the OS's store. I am running Ubuntu 14.04.
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered:
joemillerr
changed the title
SSL PEM file issues
Using ssl_verify=true within a Chef run?
Aug 11, 2017
I am attempting to configure the client to run within a Chef run using an internal CA issued certificate. To do this I must set the environment variable
SSL_CERT_FILE
but I can't seem to get this environment variable to be present during a Chef run. While I know its not really an issue that is unique to this particular gem I was hoping since the Chef team supports this gem you would have some insight into using it within a Chef run.The specific error I receive is the following:
OpenSSL::SSL::SSLError ---------------------- SSL_connect returned=1 errno=0 state=error: certificate verify failed
Which is resolved by flipping
ssl_verify=false
This is the first time I have come across needing an environment variable in a Chef run and its proved to be very difficult. I have tried exporting it in /etc/profile and /etc/bash.bashrc - I've tried a Ruby ENV variable within the run (wrapped in a ruby block also) - I've tried both the "magic_shell" and "bash" cookbooks to set it but nothing seems to set the environment variable. I have also placed the cert in question in "/etc/chef/trusted_certs/" which I thought was akin to placing a cert in the "ssl" directory in a normal Ruby installation, making Chef's embedded Ruby aware of this cert during the run. I've also added the cert to the OS's store. I am running Ubuntu 14.04.
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: