diff options
| author | Jacob Helwig <jacob@puppetlabs.com> | 2010-09-21 14:01:15 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-09-28 15:36:23 -0700 |
| commit | 66cf3a925b4b6d9b40cbdf95f2be6575bb05a881 (patch) | |
| tree | d79edb7a8867a2e748e9b6f8bd4f3e191ade3aad /lib/puppet/sslcertificates | |
| parent | d54352a0cc305cfada05d9ecb927e79957c8d744 (diff) | |
| download | puppet-66cf3a925b4b6d9b40cbdf95f2be6575bb05a881.tar.gz puppet-66cf3a925b4b6d9b40cbdf95f2be6575bb05a881.tar.xz puppet-66cf3a925b4b6d9b40cbdf95f2be6575bb05a881.zip | |
Fix #4226 - Prepend 'Puppet CA: ' to fqdn for default root ca_name
Having a root ca_name that matches the fqdn of the puppet master would
cause certificate lookup problems on some clients, resulting in failed SSL
negotiation.
Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'lib/puppet/sslcertificates')
| -rw-r--r-- | lib/puppet/sslcertificates/ca.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/puppet/sslcertificates/ca.rb b/lib/puppet/sslcertificates/ca.rb index 63e6b922a..f3321bd29 100644 --- a/lib/puppet/sslcertificates/ca.rb +++ b/lib/puppet/sslcertificates/ca.rb @@ -147,21 +147,19 @@ class Puppet::SSLCertificates::CA # Create the root certificate. def mkrootcert - # Make the root cert's name the FQDN of the host running the CA. - name = Facter["hostname"].value + # Make the root cert's name "Puppet CA: " plus the FQDN of the host running the CA. + name = "Puppet CA: #{Facter["hostname"].value}" if domain = Facter["domain"].value name += ".#{domain}" end - cert = Certificate.new( - + cert = Certificate.new( :name => name, :cert => @config[:cacert], :encrypt => @config[:capass], :key => @config[:cakey], :selfsign => true, :ttl => ttl, - :type => :ca ) @@ -241,19 +239,15 @@ class Puppet::SSLCertificates::CA f << "%04X" % (serial + 1) } - - newcert = Puppet::SSLCertificates.mkcert( - + newcert = Puppet::SSLCertificates.mkcert( :type => :server, :name => csr.subject, :ttl => ttl, :issuer => @cert, :serial => serial, - :publickey => csr.public_key ) - sign_with_key(newcert) self.storeclientcert(newcert) |
