# File lib/puppet/ssl/host.rb, line 180
180:   def generate
181:     generate_key unless key
182:     generate_certificate_request unless certificate_request
183: 
184:     # If we can get a CA instance, then we're a valid CA, and we
185:     # should use it to sign our request; else, just try to read
186:     # the cert.
187:     if ! certificate and ca = Puppet::SSL::CertificateAuthority.instance
188:       ca.sign(self.name)
189:     end
190:   end