# 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:** 9

<div class="post-metadata">

**Author:** ![thousandsofthem](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thousandsofthem/32/1030_2.png) [@thousandsofthem](https://forum.elixirforum.com/u/thousandsofthem)\
**Post date:** [May 25, 2017, 8:26am UTC](https://forum.elixirforum.com/t/ssl-connection-issue/5446/9 "2017-05-25T08:26:50Z")

</div>

Thank you, that could be the reason. Certificate contains 3 `CERTIFICATE` sections. Playing with it atm.  
No progress so far though

```elixir
... [ssl: [keyfile: "some.key", certfile: "cert-1.pem", cacertfile: "certs-1,3.pem", ciphers: [{:rsa, :aes_128_gcm, :null, :sha256}], versions: [:"tlsv1.2"]]])

```

```elixir
# cert 1
[error] SSL: :certify: tls_connection.erl:715:Fatal error: handshake failure - malformed_handshake_data
{:error, %HTTPoison.Error{id: nil, reason: {:tls_alert, 'handshake failure'}}}
# cert 2 and 3
[info] [83, 83, 76, 32, 87, 65, 82, 78, 73, 78, 71, 58, 32, 73, 103, 110, 111, 114, 105, 110, 103, 32, 97, 32, 67, 65, 32, 99, 101, 114, 116, 32, 97, 115, 32, 105, 116, 32, 99, 111, 117, 108, 100, 32, 110, 111, 116, 32, 98, 101, ...]
{:error, %HTTPoison.Error{id: nil, reason: :closed}}

```

decoded numbers: `SSL WARNING: Ignoring a CA cert as it could not be` (probably ends with `correctly decoded`)  
Probably i’m not doing something right, just extracted one section to separate file and included other two as cacert.  
Looks like it’s correct direction to dig in, thanks @voltone

P.S. cURL’s cacert bundle didn’t help as well

---

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