diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Auth/Verify/LDAP.pm | 8 | ||||
-rw-r--r-- | Bugzilla/Config/LDAP.pm | 6 |
2 files changed, 14 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}; } diff --git a/Bugzilla/Config/LDAP.pm b/Bugzilla/Config/LDAP.pm index 3f123243b..a9b46382e 100644 --- a/Bugzilla/Config/LDAP.pm +++ b/Bugzilla/Config/LDAP.pm @@ -47,6 +47,12 @@ sub get_param_list { }, { + name => 'LDAPstarttls', + type => 'b', + default => 0 + }, + + { name => 'LDAPbinddn', type => 't', default => '' |