# File lib/puppet/network/handler/ca.rb, line 30
30:         def autosign?(hostname)
31:             # simple values are easy
32:             if autosign == true or autosign == false
33:                 return autosign
34:             end
35: 
36:             # we only otherwise know how to handle files
37:             unless autosign =~ /^\//
38:                 raise Puppet::Error, "Invalid autosign value %s" %
39:                     autosign.inspect
40:             end
41: 
42:             unless FileTest.exists?(autosign)
43:                 unless defined? @@warnedonautosign
44:                     @@warnedonautosign = true
45:                     Puppet.info "Autosign is enabled but %s is missing" % autosign
46:                 end
47:                 return false
48:             end
49:             auth = Puppet::Network::AuthStore.new
50:             File.open(autosign) { |f|
51:                 f.each { |line|
52:                     next if line =~ /^\s*#/
53:                     next if line =~ /^\s*$/
54:                     auth.allow(line.chomp)
55:                 }
56:             }
57: 
58:             # for now, just cheat and pass a fake IP address to allowed?
59:             return auth.allowed?(hostname, "127.1.1.1")
60:         end