55: def initialize(hash = {})
56: Puppet.settings.use(:main, :ca, :ssl)
57: self.setconfig(hash)
58:
59: if Puppet[:capass]
60: if FileTest.exists?(Puppet[:capass])
61:
62:
63:
64: @config[:password] = self.getpass
65: else
66:
67: unless FileTest.exists?(@config[:cacert])
68: @config[:password] = self.genpass
69: end
70: end
71: end
72:
73: self.getcert
74: init_crl
75: unless FileTest.exists?(@config[:serial])
76: Puppet.settings.write(:serial) do |f|
77: f << "%04X" % 1
78: end
79: end
80: end