From d778139d75c6733466da4e438ebba897eb1851a1 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Sun, 11 Jul 2010 12:13:28 +0800 Subject: [PATCH] Net::LdapPdu -> Net::LDAP::PDU. --- lib/net/ldap.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/net/ldap.rb b/lib/net/ldap.rb index 8896d28..f75c214 100644 --- a/lib/net/ldap.rb +++ b/lib/net/ldap.rb @@ -1170,12 +1170,12 @@ class Net::LDAP::Connection #:nodoc: # go here. when :start_tls msgid = next_msgid.to_ber - request = [StartTlsOid.to_ber].to_ber_appsequence(Net::LdapPdu::ExtendedRequest) + request = [StartTlsOid.to_ber].to_ber_appsequence(Net::LDAP::PDU::ExtendedRequest) request_pkt = [msgid, request].to_ber_sequence @conn.write request_pkt be = @conn.read_ber(Net::LDAP::AsnSyntax) raise Net::LDAP::LdapError, "no start_tls result" if be.nil? - pdu = Net::LdapPdu.new(be) + pdu = Net::LDAP::PDU.new(be) raise Net::LDAP::LdapError, "no start_tls result" if pdu.nil? if pdu.result_code.zero? @conn = self.class.wrap_with_ssl(@conn) @@ -1234,7 +1234,7 @@ class Net::LDAP::Connection #:nodoc: request_pkt = [msgid, request].to_ber_sequence @conn.write request_pkt - (be = @conn.read_ber(Net::LDAP::AsnSyntax) and pdu = Net::LdapPdu.new(be)) or raise Net::LDAP::LdapError, "no bind result" + (be = @conn.read_ber(Net::LDAP::AsnSyntax) and pdu = Net::LDAP::PDU.new(be)) or raise Net::LDAP::LdapError, "no bind result" pdu.result_code end @@ -1273,7 +1273,7 @@ class Net::LDAP::Connection #:nodoc: request_pkt = [msgid, request].to_ber_sequence @conn.write request_pkt - (be = @conn.read_ber(Net::LDAP::AsnSyntax) and pdu = Net::LdapPdu.new(be)) or raise Net::LDAP::LdapError, "no bind result" + (be = @conn.read_ber(Net::LDAP::AsnSyntax) and pdu = Net::LDAP::PDU.new(be)) or raise Net::LDAP::LdapError, "no bind result" return pdu.result_code unless pdu.result_code == 14 # saslBindInProgress raise Net::LDAP::LdapError, "sasl-challenge overflow" if ((n += 1) > MaxSaslChallenges) @@ -1401,7 +1401,7 @@ class Net::LDAP::Connection #:nodoc: result_code = 0 controls = [] - while (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LdapPdu.new(be)) + while (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LDAP::PDU.new(be)) case pdu.app_tag when 4 # search-data n_results += 1 @@ -1478,7 +1478,7 @@ class Net::LDAP::Connection #:nodoc: pkt = [next_msgid.to_ber, request].to_ber_sequence @conn.write pkt - (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LdapPdu.new(be)) && (pdu.app_tag == 7) or raise Net::LDAP::LdapError, "response missing or invalid" + (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LDAP::PDU.new(be)) && (pdu.app_tag == 7) or raise Net::LDAP::LdapError, "response missing or invalid" pdu.result_code end @@ -1500,7 +1500,7 @@ class Net::LDAP::Connection #:nodoc: pkt = [next_msgid.to_ber, request].to_ber_sequence @conn.write pkt - (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LdapPdu.new(be)) && (pdu.app_tag == 9) or raise Net::LDAP::LdapError, "response missing or invalid" + (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LDAP::PDU.new(be)) && (pdu.app_tag == 9) or raise Net::LDAP::LdapError, "response missing or invalid" pdu.result_code end @@ -1516,7 +1516,7 @@ class Net::LDAP::Connection #:nodoc: pkt = [next_msgid.to_ber, request].to_ber_sequence @conn.write pkt - (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LdapPdu.new(be)) && (pdu.app_tag == 13) or raise Net::LDAP::LdapError, "response missing or invalid" + (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LDAP::PDU.new(be)) && (pdu.app_tag == 13) or raise Net::LDAP::LdapError, "response missing or invalid" pdu.result_code end @@ -1530,7 +1530,7 @@ class Net::LDAP::Connection #:nodoc: pkt = [next_msgid.to_ber, request].to_ber_sequence @conn.write pkt - (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LdapPdu.new(be)) && (pdu.app_tag == 11) or raise Net::LDAP::LdapError, "response missing or invalid" + (be = @conn.read_ber(Net::LDAP::AsnSyntax)) && (pdu = Net::LDAP::PDU.new(be)) && (pdu.app_tag == 11) or raise Net::LDAP::LdapError, "response missing or invalid" pdu.result_code end end # class Connection