[erlang-questions] Eldap and start_tls issues

Alex Shneyderman a.shneyderman@REDACTED
Wed Jan 14 15:51:07 CET 2015


you need to start ssl application. Run this

application:ensure_all_started(ssl)

before eldap calls.




On Wed, Jan 14, 2015 at 6:45 AM, William B <william@REDACTED> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> When I attempt to use the start_tls function in my code as below I am
> recieving the error:
>
> **error:{case_clause,{error,ssl_not_started}}
>
> The cert is the correct CA cert, and I have verified that TLS and the
> cert work with ldap search. The Hosts list is also correct. When
> connected to ldap without start_tls, the connection works and can be
> quiered.
>
> How can I proceed debugging this, or am I just missing parameters
> needed by start_tls?
>
> Any advice is appreciated.
>
>
> ldap_starttls(Conn) ->
>     case eldap:start_tls(Conn, [
>         {cacertfile, "/etc/pki/tls/certs/ca.crt"},
>         {verify, verify_none}
>     ]) of
>         ok -> Conn
>     end.
>
> ldap_open(Hosts) ->
>     case eldap:open(Hosts, [{port, 389}]) of
>         {ok, Conn} -> ldap_starttls(Conn);
>         {error, Reason} -> io:format("Error ~p", [Reason]);
>         {_, _} -> io:format("Error UNKNOWN", [])
>     end.
>
> - --
> Sincerely,
>
> William Brown
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQIcBAEBAgAGBQJUtlbxAAoJEO/EFteBqAmaP7AP/2iMmqZrimEISWUaY6sZz7nx
> plYY40ITJ/ec2mFVe5uoWrR/lRySfhKGbtkV6i4cFk/Pvs0prO1P5xCtqGl4dT09
> 0XJEaPfM4eiqCaEfiCteqwibgPtLMURMiHFS5FGUyyOPf+frsdJMk7kiNuencn2L
> 7XKZ9tfO12qSgBAvAtdpPrTkw3U+UYj2qnsVC/oYoUH1TnS6UYHnNUUXLrZrcFqw
> 2qyiXUzVVwl1nlUHPE/4oKCVQp4fMi32fqlO0VRIm3OjMTIUl7GRNtS4/k+g9rdO
> 7xk9AduNdVSMgF9GAfKNJm+49OAyngiuDv/JLTjscpcmzACPAHHE/RUMGK9skks2
> 3MwtYzyEDOCqCmrB/gunkex6CCz24NphB2PoxTedmA8xeEiemINhy+27Br8gFQ8p
> GVnCfxQML3vh34O7sLamtX4t1hPJWbVAeiP6xEI9uw7ufMAOAj/TB5C2qLfihQ0o
> OV3wXNISyba33ffaaUBa6/tgVysAuDVWbq+T4kj0K4q6+bLE4cxBePkNk45uEX16
> /GxTgyFx7cTOMybk25JDry9Lxj7zSjaOmAKQaNFv7vWoeranen+t1zcXaAZolFTl
> g9zBKhGYXQS2LklMb6exvKoG7lKfRdUaRwZ+K2oxhbKxOUisKbSs4xM5dpioGwTL
> FiA4DAtkGHwFr4vhfqzY
> =poEY
> -----END PGP SIGNATURE-----
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150114/96b1df07/attachment.htm>


More information about the erlang-questions mailing list