diff options
author | lpsolit%gmail.com <> | 2006-06-02 20:52:48 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-06-02 20:52:48 +0200 |
commit | 9ba60234f46f8f5a291983111951c6158671f7d7 (patch) | |
tree | 0722ca5e7d2283d0c163e08ac87f9a1404d33500 /Bugzilla/Auth | |
parent | 2b9f5bf80911872ca809061bd46d8fc7f64c2929 (diff) | |
download | bugzilla-9ba60234f46f8f5a291983111951c6158671f7d7.tar.gz bugzilla-9ba60234f46f8f5a291983111951c6158671f7d7.tar.xz |
Bug 282687: LDAP: TLS Support - Patch by guillomovitch@zarb.org r=mkanat a=justdave
Diffstat (limited to 'Bugzilla/Auth')
-rw-r--r-- | Bugzilla/Auth/Verify/LDAP.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/Verify/LDAP.pm index dccfa0b7c..2ee5247ec 100644 --- a/Bugzilla/Auth/Verify/LDAP.pm +++ b/Bugzilla/Auth/Verify/LDAP.pm @@ -164,6 +164,14 @@ sub ldap { my $conn_string = "$protocol://$server:$port"; $self->{ldap} = new Net::LDAP($conn_string) || ThrowCodeError("ldap_connect_failed", { server => $conn_string }); + + # try to start TLS if needed + if (Param("LDAPstarttls")) { + my $mesg = $self->{ldap}->start_tls(); + ThrowCodeError("ldap_start_tls_failed", { error => $mesg->error() }) + if $mesg->code(); + } + return $self->{ldap}; } |