# 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 #{autosign.inspect}"
39:       end
40: 
41:       unless FileTest.exists?(autosign)
42:         unless defined?(@@warnedonautosign)
43:           @@warnedonautosign = true
44:           Puppet.info "Autosign is enabled but #{autosign} is missing"
45:         end
46:         return false
47:       end
48:       auth = Puppet::Network::AuthStore.new
49:       File.open(autosign) { |f|
50:         f.each { |line|
51:           next if line =~ /^\s*#/
52:           next if line =~ /^\s*$/
53:           auth.allow(line.chomp)
54:         }
55:       }
56: 
57:       # for now, just cheat and pass a fake IP address to allowed?
58:       auth.allowed?(hostname, "127.1.1.1")
59:     end