# SSL connection issue

**URL:** <https://forum.elixirforum.com/t/ssl-connection-issue/5446>\
**Category:** Questions\
**Tags:** ssl, troubleshooting\
**Created:** [May 24, 2017, 11:24am UTC](https://forum.elixirforum.com/t/ssl-connection-issue/5446 "2017-05-24T11:24:11Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Azolo](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/azolo/32/2189_2.png) [@Azolo](https://forum.elixirforum.com/u/Azolo)\
**Post date:** [May 25, 2017, 6:16pm UTC](https://forum.elixirforum.com/t/ssl-connection-issue/5446/10 "2017-05-25T18:16:00Z")

</div>

Instead of using the `:cacertfile` use the `:cacerts` option.

```elixir
cert1 = File.read!("path/to/cert1.pem") |> :public_key.pem_decode
cert2 = File.read!("path/to/cert2.pem") |> :public_key.pem_decode

cacerts = [cert1, cert2]

```

SSL in Erlang is the most confusing thing ever.

---

_[View the full topic](https://forum.elixirforum.com/t/ssl-connection-issue/5446)._
