summaryrefslogtreecommitdiff
path: root/lib/gitlab/ldap
diff options
context:
space:
mode:
authorBoris HUISGEN <bhuisgen@hbis.fr>2014-06-19 10:41:23 +0200
committerBoris HUISGEN <bhuisgen@hbis.fr>2014-06-19 10:41:23 +0200
commitbac7d17c7b736e09228857f8c8cce8bf6ba70aa7 (patch)
treec7cb2cee93f49c92417889547b4af6afa756090a /lib/gitlab/ldap
parent67934145e88e439c4266d6a4f19372f170fc6095 (diff)
downloadgitlab-ce-bac7d17c7b736e09228857f8c8cce8bf6ba70aa7.tar.gz
Fix LDAP TLS authentication
Diffstat (limited to 'lib/gitlab/ldap')
-rw-r--r--lib/gitlab/ldap/adapter.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/ldap/adapter.rb b/lib/gitlab/ldap/adapter.rb
index e36616f0e66..ca239bea884 100644
--- a/lib/gitlab/ldap/adapter.rb
+++ b/lib/gitlab/ldap/adapter.rb
@@ -14,7 +14,15 @@ module Gitlab
end
def self.adapter_options
- encryption = config['method'].to_s == 'ssl' ? :simple_tls : nil
+ encryption =
+ case config['method'].to_s
+ when 'ssl'
+ :simple_tls
+ when 'tls'
+ :start_tls
+ else
+ nil
+ end
options = {
host: config['host'],