Net::LdapPdu -> Net::LDAP::PDU.
This commit is contained in:
parent
cc55227083
commit
d778139d75
|
@ -1170,12 +1170,12 @@ class Net::LDAP::Connection #:nodoc:
|
||||||
# go here.
|
# go here.
|
||||||
when :start_tls
|
when :start_tls
|
||||||
msgid = next_msgid.to_ber
|
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
|
request_pkt = [msgid, request].to_ber_sequence
|
||||||
@conn.write request_pkt
|
@conn.write request_pkt
|
||||||
be = @conn.read_ber(Net::LDAP::AsnSyntax)
|
be = @conn.read_ber(Net::LDAP::AsnSyntax)
|
||||||
raise Net::LDAP::LdapError, "no start_tls result" if be.nil?
|
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?
|
raise Net::LDAP::LdapError, "no start_tls result" if pdu.nil?
|
||||||
if pdu.result_code.zero?
|
if pdu.result_code.zero?
|
||||||
@conn = self.class.wrap_with_ssl(@conn)
|
@conn = self.class.wrap_with_ssl(@conn)
|
||||||
|
@ -1234,7 +1234,7 @@ class Net::LDAP::Connection #:nodoc:
|
||||||
request_pkt = [msgid, request].to_ber_sequence
|
request_pkt = [msgid, request].to_ber_sequence
|
||||||
@conn.write request_pkt
|
@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
|
pdu.result_code
|
||||||
end
|
end
|
||||||
|
@ -1273,7 +1273,7 @@ class Net::LDAP::Connection #:nodoc:
|
||||||
request_pkt = [msgid, request].to_ber_sequence
|
request_pkt = [msgid, request].to_ber_sequence
|
||||||
@conn.write request_pkt
|
@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
|
return pdu.result_code unless pdu.result_code == 14 # saslBindInProgress
|
||||||
raise Net::LDAP::LdapError, "sasl-challenge overflow" if ((n += 1) > MaxSaslChallenges)
|
raise Net::LDAP::LdapError, "sasl-challenge overflow" if ((n += 1) > MaxSaslChallenges)
|
||||||
|
|
||||||
|
@ -1401,7 +1401,7 @@ class Net::LDAP::Connection #:nodoc:
|
||||||
result_code = 0
|
result_code = 0
|
||||||
controls = []
|
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
|
case pdu.app_tag
|
||||||
when 4 # search-data
|
when 4 # search-data
|
||||||
n_results += 1
|
n_results += 1
|
||||||
|
@ -1478,7 +1478,7 @@ class Net::LDAP::Connection #:nodoc:
|
||||||
pkt = [next_msgid.to_ber, request].to_ber_sequence
|
pkt = [next_msgid.to_ber, request].to_ber_sequence
|
||||||
@conn.write pkt
|
@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
|
pdu.result_code
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1500,7 +1500,7 @@ class Net::LDAP::Connection #:nodoc:
|
||||||
pkt = [next_msgid.to_ber, request].to_ber_sequence
|
pkt = [next_msgid.to_ber, request].to_ber_sequence
|
||||||
@conn.write pkt
|
@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
|
pdu.result_code
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1516,7 +1516,7 @@ class Net::LDAP::Connection #:nodoc:
|
||||||
pkt = [next_msgid.to_ber, request].to_ber_sequence
|
pkt = [next_msgid.to_ber, request].to_ber_sequence
|
||||||
@conn.write pkt
|
@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
|
pdu.result_code
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1530,7 +1530,7 @@ class Net::LDAP::Connection #:nodoc:
|
||||||
pkt = [next_msgid.to_ber, request].to_ber_sequence
|
pkt = [next_msgid.to_ber, request].to_ber_sequence
|
||||||
@conn.write pkt
|
@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
|
pdu.result_code
|
||||||
end
|
end
|
||||||
end # class Connection
|
end # class Connection
|
||||||
|
|
Loading…
Reference in a new issue