Skip Menu |

This queue is for tickets about the perl-ldap CPAN distribution.

Report information
The Basics
Id: 46125
Status: resolved
Priority: 0/
Queue: perl-ldap

People
Owner: Nobody in particular
Requestors: yair.lenga [...] citi.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.39
Fixed in: (no value)



Subject: LWP does not work with LDAPS queries.
Currently, Net::LDAP has full support for LDAPS, but not using LWP. LWP can parse ldaps URL, but can not execute. The small ldaps.pm module (below) will provide support for ldaps. Also, ldap.pm need to be modified to pass the scheme to the Net::LDAP. my $scheme = $url->scheme ; # WAS: if ( $url->scheme ne 'ldap' ) { if ($scheme ne 'ldap' && $scheme ne 'ldaps' ) { my $scheme = $url->scheme; return new HTTP::Response &HTTP::Status::RC_INTERNAL_SERVER_ERROR, "LWP::Protocol::ldap::request called for '$scheme'"; } ... # Object creation modified to support ldaps or ldap. # WAS: my $ldap = new Net::LDAP($host, port => $port); my $ldap = new Net::LDAP("$scheme://$host/", port => $port); === LWP/Protocol/ldaps.pm: package LWP::Protocol::ldaps; use strict ; use base 'LWP::Protocol::ldap' ; 1;
From: yair.lenga [...] citi.com
Hi, I've just realized that there are two SECURE modes for ldap (ldaps, and ldap/start_tls) In addition to the LDAPS, will it be possible to add (using request header or LDAP url extension ?) an option to force the start_tls method over LDAP connection when using LWP::Protocol/LDAP ?
Subject: Re: [rt.cpan.org #46125] LWP does not work with LDAPS queries.
Date: Mon, 18 May 2009 10:43:37 -0500
To: bug-perl-ldap [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
On May 18, 2009, at 10:31 AM, yair via RT wrote: Show quoted text
> I've just realized that there are two SECURE modes for ldap (ldaps, > and > ldap/start_tls) > > In addition to the LDAPS, will it be possible to add (using request > header or LDAP url extension ?) an option to force the start_tls > method > over LDAP connection when using LWP::Protocol/LDAP ?
ldaps is port 636 and is always over SSL ldap/start_tls will be to the ldap port (not ldaps). RFC2255 does not describe support for start_tls, so I do not plan to support that. Personally I think that if you have a need for start_tls then you should be programming Net::LDAP directly. Graham.