Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ssl_verify=true within a Chef run? #78

Open
joemillerr opened this issue Jan 5, 2017 · 0 comments
Open

Using ssl_verify=true within a Chef run? #78

joemillerr opened this issue Jan 5, 2017 · 0 comments

Comments

@joemillerr
Copy link

joemillerr commented Jan 5, 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.

@joemillerr joemillerr changed the title SSL PEM file issues Using ssl_verify=true within a Chef run? Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant