summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-08 09:44:29 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-08 09:44:29 +0300
commit85a15b0e224422965690220bbd51fe232a88fcd0 (patch)
treec2e1f9f49fe96a3f30fd1524f8e850f203559862
parent7bd9a702e3cf2fa88968c723cbf014a6bba0f955 (diff)
parentbac7d17c7b736e09228857f8c8cce8bf6ba70aa7 (diff)
downloadgitlab-ce-85a15b0e224422965690220bbd51fe232a88fcd0.tar.gz
Merge pull request #7152 from bhuisgen/master
Fix LDAP TLS authentication
-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'],