mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-13 12:31:13 +00:00
Ensure :ssl is started before we attempt to make the LDAP connection
This commit is contained in:
parent
65a7b387c3
commit
123093a186
1 changed files with 2 additions and 4 deletions
|
@ -97,6 +97,8 @@ defmodule Pleroma.LDAP do
|
||||||
tls = Keyword.get(ldap, :tls, false)
|
tls = Keyword.get(ldap, :tls, false)
|
||||||
cacertfile = Keyword.get(ldap, :cacertfile) || CAStore.file_path()
|
cacertfile = Keyword.get(ldap, :cacertfile) || CAStore.file_path()
|
||||||
|
|
||||||
|
if ssl, do: Application.ensure_all_started(:ssl)
|
||||||
|
|
||||||
default_secure_opts = [
|
default_secure_opts = [
|
||||||
verify: :verify_peer,
|
verify: :verify_peer,
|
||||||
cacerts: decode_certfile(cacertfile),
|
cacerts: decode_certfile(cacertfile),
|
||||||
|
@ -123,10 +125,6 @@ defmodule Pleroma.LDAP do
|
||||||
{:ok, connection} ->
|
{:ok, connection} ->
|
||||||
try do
|
try do
|
||||||
cond do
|
cond do
|
||||||
ssl ->
|
|
||||||
:application.ensure_all_started(:ssl)
|
|
||||||
{:ok, connection}
|
|
||||||
|
|
||||||
tls ->
|
tls ->
|
||||||
case :eldap.start_tls(
|
case :eldap.start_tls(
|
||||||
connection,
|
connection,
|
||||||
|
|
Loading…
Reference in a new issue