# File lib/puppet/sslcertificates/ca.rb, line 277
277:     def storeclientcsr(csr)
278:         host = thing2name(csr)
279: 
280:         csrfile = host2csrfile(host)
281:         if File.exists?(csrfile)
282:             raise Puppet::Error, "Certificate request for %s already exists" % host
283:         end
284: 
285:         Puppet.settings.writesub(:csrdir, csrfile) do |f|
286:             f.print csr.to_pem
287:         end
288:     end