Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'CHEF-996' of git://github.com/tfheen/chef into tfheen/C…

…HEF-996
  • Loading branch information...
commit 2ea8296cd283ce82d8b302db5b6f62fd32044bcf 2 parents 1eba22e + f45f254
@adamhjk adamhjk authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 chef/lib/chef/certificate.rb
View
4 chef/lib/chef/certificate.rb
@@ -41,7 +41,7 @@ def generate_signing_ca
FileUtils.mkdir_p ca_basedir
end
- keypair = OpenSSL::PKey::RSA.generate(1024)
+ keypair = OpenSSL::PKey::RSA.generate(4096)
ca_cert = OpenSSL::X509::Certificate.new
ca_cert.version = 3
@@ -71,7 +71,7 @@ def generate_signing_ca
ca_cert.sign keypair, OpenSSL::Digest::SHA1.new
File.open(ca_cert_file, "w") { |f| f.write ca_cert.to_pem }
- File.open(ca_keypair_file, "w") { |f| f.write keypair.to_pem }
+ File.open(ca_keypair_file, File::WRONLY|File::EXCL|File::CREAT, 0600) { |f| f.write keypair.to_pem }
end
self
end
Please sign in to comment.
Something went wrong with that request. Please try again.