# File lib/puppet/sslcertificates/ca.rb, line 209
209:     def setconfig(hash)
210:         @config = {}
211:         Puppet.settings.params("ca").each { |param|
212:             param = param.intern if param.is_a? String
213:             if hash.include?(param)
214:                 @config[param] = hash[param]
215:                 Puppet[param] = hash[param]
216:                 hash.delete(param)
217:             else
218:                 @config[param] = Puppet[param]
219:             end
220:         }
221: 
222:         if hash.include?(:password)
223:             @config[:password] = hash[:password]
224:             hash.delete(:password)
225:         end
226: 
227:         if hash.length > 0
228:             raise ArgumentError, "Unknown parameters %s" % hash.keys.join(",")
229:         end
230: 
231:         [:cadir, :csrdir, :signeddir].each { |dir|
232:             unless @config[dir]
233:                 raise Puppet::DevError, "%s is undefined" % dir
234:             end
235:         }
236:     end