# File lib/puppet/util/ldap/connection.rb, line 62 62: def start 63: case ssl 64: when :tls 65: @connection = LDAP::SSLConn.new(host, port, true) 66: when true 67: @connection = LDAP::SSLConn.new(host, port) 68: else 69: @connection = LDAP::Conn.new(host, port) 70: end 71: @connection.set_option(LDAP::LDAP_OPT_PROTOCOL_VERSION, 3) 72: @connection.set_option(LDAP::LDAP_OPT_REFERRALS, LDAP::LDAP_OPT_ON) 73: @connection.simple_bind(user, password) 74: rescue => detail 75: raise Puppet::Error, "Could not connect to LDAP: #{detail}" 76: end