diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-19 15:35:04 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-19 15:35:04 +0000 |
commit | d2634baa0ec8dc00170bd54bea25f526c8a7ed97 (patch) | |
tree | d5c265653d3dfd7071708e458435292dd90212b1 /lib/puppet/sslcertificates.rb | |
parent | 449f6626904cbf4165a3e481e8b9c7433be997d8 (diff) | |
download | puppet-d2634baa0ec8dc00170bd54bea25f526c8a7ed97.tar.gz puppet-d2634baa0ec8dc00170bd54bea25f526c8a7ed97.tar.xz puppet-d2634baa0ec8dc00170bd54bea25f526c8a7ed97.zip |
Fixing #118; the hash is now always 8 hex characters, 0-padded. Also changed the CA cert name to the FQDN of the host serving the CA, rather than "CAcert".
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1117 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/sslcertificates.rb')
-rwxr-xr-x | lib/puppet/sslcertificates.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/sslcertificates.rb b/lib/puppet/sslcertificates.rb index a56e64add..a003c6551 100755 --- a/lib/puppet/sslcertificates.rb +++ b/lib/puppet/sslcertificates.rb @@ -124,7 +124,8 @@ module Puppet::SSLCertificates end def self.mkhash(dir, cert, certfile) - hash = "%x" % cert.issuer.hash + # Make sure the hash is zero-padded to 8 chars + hash = "%08x" % cert.issuer.hash hashpath = nil 10.times { |i| path = File.join(dir, "%s.%s" % [hash, i]) @@ -149,6 +150,7 @@ module Puppet::SSLCertificates break } + return hashpath end require 'puppet/sslcertificates/certificate' |