zuazo / ssl_certificate-cookbook

Chef cookbook to make it easy for other cookbooks to support SSL.
https://supermarket.chef.io/cookbooks/ssl_certificate
Apache License 2.0
32 stars 36 forks source link

Creating a PEM file containing both cert and private key? #35

Open jayhendren opened 7 years ago

jayhendren commented 7 years ago

Is there a way to use the ssl_certificate cookbook to create a PEM file containing the signed certificate, intermediate certs (if any), and private key, in that order? I'm trying to write a cookbook to configure some HAProxy instances, and HAProxy needs the certs and key to live in a PEM file together. We already use ssl_certificate to manage SSL certs for other applications and generate self-signed certs in TestKitchen, so I was hoping to use it for HAProxy too.

zuazo commented 7 years ago

No, currently. Although I do not think that it will be difficult to add it to the cookbook.

But I have some doubts about how we can implement the interface. How do you expect it to work? I mean, adding a property to the resource and generating only the pem file, generating both the cert&key and pem, ...?

Of course, please, send me a PR if you try to implement it.

jayhendren commented 7 years ago

I'm not sure of how it should be implemented, but here are a couple thoughts:

hrak commented 6 years ago

The certificate cookbook has the boolean properties combined_file and nginx_cert to achieve this.