chef-api
chef-api copied to clipboard
Adding fix for SSL verification in v0.5.0
Hello! I'm using version 0.5.0 of chef-api with Ruby 1.9.3 and an AWS OpsWorks server. I ran into an issue with connecting to the server with SSL verification enabled and using Amazon's provided PEM file. Turns out the issue is because the PEM they provide only has a Certificate, not both a Certificate and Key, so the connection is failing around this line when a key cannot be parsed.
This PR is to replace the cert and key parsing lines with a single line leveraging the ca_file
field for the PEM instead which seems to be a more reliable way of connecting with a non-standard PEM. I've only made the change to v0.5.0.
This may also fix this issue (#40)?
In 0.9.0 almost 2 years later I still have the issue :(
@tas50 What is necessary to have this change merged? Our Chef server admins will not provide me with the servers private/public key pair simply so that I can use this API and I imagine this would be the case generally. Users should only need to pass the trusted certificate in order to create an SSH connection.