<div dir="ltr">In hackney, by default the HTTPS connection  is using the following options:<div><br></div><div><div>    [{verify_fun, {fun ssl_verify_hostname:verify_fun/3,</div><div>                                   [{check_hostname, Host}]}},</div><div>    {cacertfile, CACertFile },</div><div>    {server_name_indication, Host},</div><div>    {verify, verify_peer}, {depth, 99},</div><div>    {reuse_sessions, true}]<br></div></div><div><br></div><div>Where the Host is based on the Url. CaCertFile is this one:</div><div><a href="https://github.com/benoitc/hackney/blob/master/priv/ca-bundle.crt">https://github.com/benoitc/hackney/blob/master/priv/ca-bundle.crt</a></div><div><br></div><div>And  the verify_fun is here: <a href="https://github.com/deadtrickster/ssl_verify_hostname.erl/blob/master/src/ssl_verify_hostname.erl">https://github.com/deadtrickster/ssl_verify_hostname.erl/blob/master/src/ssl_verify_hostname.erl</a></div><div><br></div><div>It works in most cases but when connecting to Twillio I get the following error:</div><div><br></div><div><div>    2> hackney:get("<a href="https://api.twilio.com/2010-04-01/Accounts/">https://api.twilio.com/2010-04-01/Accounts/</a>").</div><div><br></div><div>    =ERROR REPORT==== 22-Jun-2015::10:46:28 ===</div><div>    SSL: certify: ssl_handshake.erl:1403:Fatal error: unknown ca</div><div>    {error,{tls_alert,"unknown ca"}}</div></div><div><br></div><div>When checking the CA files it seems it contains the thawte certificaes:</div><div><br></div><div><div>    $ cat priv/ca-bundle.crt|grep thawte                    </div><div>    thawte Primary Root CA</div><div>    thawte Primary Root CA - G2</div><div>    thawte Primary Root CA - G3</div></div><div><br></div><div>Before opening a ticket I was wondering if I missed something in my configuration? Is there anything wrong in the CA file? Any option is missing?</div><div><br></div><div>- benoit</div><div><br></div><div><br></div></div>