Reputation: 2102
I would like to do the following with chef:
How I could do that using chef? I've seen that cookbook https://supermarket.chef.io/cookbooks/openssl but there doesn't appear how to sign a certificate.
Following is the code that I actually use:
openssl req -newkey rsa:2048 -days 3650 -x509 -nodes -out root.cer
openssl req -newkey rsa:1024 -nodes -out vault.csr -keyout vault.key
openssl ca -batch -config root-ca.conf -notext -in vault.csr -out vault.crt
sudo update-ca-trust enable
mv root.cer /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust extract
Upvotes: 0
Views: 1024
Reputation: 1525
If you really want chef to manage CA/PKI look at ssl certificate cookbook it may be more suitable. Although, more complicated than openssl cookbook.
Upvotes: 1