summaryrefslogtreecommitdiff
path: root/kitchen-tests/cookbooks
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-01-05 14:27:44 -0800
committerTim Smith <tsmith@chef.io>2018-01-05 15:17:44 -0800
commit98223f0b0fdca5ae8d460738c8c01ca0e80ec2c8 (patch)
treef053a068962ba4dbed2338eb37292614b7536b5d /kitchen-tests/cookbooks
parent21155f73467969da3b36a35b146100d1a04b0cdf (diff)
downloadchef-98223f0b0fdca5ae8d460738c8c01ca0e80ec2c8.tar.gz
Add dhparam, rsa_private_key and rsa_public_key resources
Ported from the openssl cookbook. I've done all the major refactoring there to shake the bugs out. This is just reformatted to use the mixin instead of a cookbook helper and to be library style so it works in core chef. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'kitchen-tests/cookbooks')
-rw-r--r--kitchen-tests/cookbooks/base/recipes/default.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/base/recipes/default.rb b/kitchen-tests/cookbooks/base/recipes/default.rb
index 8b0eac0e6e..ad1bba8903 100644
--- a/kitchen-tests/cookbooks/base/recipes/default.rb
+++ b/kitchen-tests/cookbooks/base/recipes/default.rb
@@ -60,4 +60,24 @@ include_recipe "cron"
include_recipe "git"
+directory "/etc/ssl"
+
+# Generate new key and certificate
+openssl_dhparam "/etc/ssl_test/dhparam.pem" do
+ key_length 1024
+ action :create
+end
+
+# Generate new key with aes-128-cbc cipher
+openssl_rsa_private_key "/etc/ssl/rsakey_aes128cbc.pem" do
+ key_length 1024
+ key_cipher "aes-128-cbc"
+ action :create
+end
+
+openssl_rsa_public_key "/etc/ssl/rsakey_aes128cbc.pub" do
+ private_key_path "/etc/ssl/rsakey_aes128cbc.pem"
+ action :create
+end
+
include_recipe "::tests"