<div dir="ltr"><div dir="ltr"><div dir="ltr">Which exact Erlang/OTP version are you on? It seems to be 21.3, and if you're not on the very latest patch level you might get bitten by ssl bugs such as <a href="https://bugs.erlang.org/browse/ERL-968">https://bugs.erlang.org/browse/ERL-968</a>. That particular one was fixed in 21.3.8.5, and even though it was originally reported with a slightly different error response, the root cause does make handshake data appear malformed to the ssl state machine.</div><div dir="ltr"><br></div><div>If that's not the issue, can you perhaps share a URL that triggers the issue?</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 26 Nov 2019 at 02:40, I Gusti Ngurah Oka Prinarjaya <<a href="mailto:okaprinarjaya@gmail.com">okaprinarjaya@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I use hackney to fetch a web page and i get error when accessing website with https with following error:<br><br><font face="monospace">TLS client: In state certify at tls_connection.erl:966 generated CLIENT ALERT: Fatal - Handshake Failure - malformed_handshake_data<br><br>** exception error: no match of right hand side value {error,<br>                                                       {tls_alert,<br>                                                        {handshake_failure,<br>                                                         "received CLIENT ALERT: Fatal - Handshake Failure - malformed_handshake_data"}}}<br>     in function  handler_test_test_test:fetch_page/1 (/Users/okaprinarjaya/Oprek/Erlang-Oprek-Tiga/idea_execute/src/handler_test_test_test.erl, line 37)</font><br></div><div><br></div><div>Then I found this: <a href="https://github.com/benoitc/hackney/issues/362" target="_blank">https://github.com/benoitc/hackney/issues/362</a> . I try to implement that github issue but still failed and still get same error message. My code based on github issue: <a href="https://pastebin.com/QeCc0tab" target="_blank">https://pastebin.com/QeCc0tab</a><br></div><div><br></div><div>My environment:<br>1. MacOS Mojave v10.14.6</div><div>2. Erlang/OTP 21 [erts-10.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]</div><div>3. I install hackney with this way through rebar3: <br><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre-wrap"><div>{hackney, <span style="color:rgb(163,21,21)">".*"</span>, {git, <span style="color:rgb(163,21,21)">"git://<a href="http://github.com/benoitc/hackney.git" target="_blank">github.com/benoitc/hackney.git</a>"</span>, {branch, <span style="color:rgb(163,21,21)">"master"</span>}}}</div></div></div><div>and my current hackney version is <span style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">1.15.2</span></div><div><br></div><div>ssl:cipher_suites() <br><br>[{ecdhe_ecdsa,aes_256_cbc,sha384,sha384},<br> {ecdhe_rsa,aes_256_cbc,sha384,sha384},<br> {ecdh_ecdsa,aes_256_cbc,sha384,sha384},<br> {ecdh_rsa,aes_256_cbc,sha384,sha384},<br> {dhe_rsa,aes_256_cbc,sha256},<br> {dhe_dss,aes_256_cbc,sha256},<br> {ecdhe_ecdsa,aes_128_cbc,sha256,sha256},<br> {ecdhe_rsa,aes_128_cbc,sha256,sha256},<br> {ecdh_ecdsa,aes_128_cbc,sha256,sha256},<br> {ecdh_rsa,aes_128_cbc,sha256,sha256},<br> {dhe_rsa,aes_128_cbc,sha256},<br> {dhe_dss,aes_128_cbc,sha256},<br> {ecdhe_ecdsa,aes_256_cbc,sha},<br> {ecdhe_rsa,aes_256_cbc,sha},<br> {dhe_rsa,aes_256_cbc,sha},<br> {dhe_dss,aes_256_cbc,sha},<br> {ecdh_ecdsa,aes_256_cbc,sha},<br> {ecdh_rsa,aes_256_cbc,sha},<br> {ecdhe_ecdsa,aes_128_cbc,sha},<br> {ecdhe_rsa,aes_128_cbc,sha},<br> {dhe_rsa,aes_128_cbc,sha},<br> {dhe_dss,aes_128_cbc,sha},<br> {ecdh_ecdsa,aes_128_cbc,sha},<br> {ecdh_rsa,aes_128_cbc,sha}]<br></div><div><br></div><div>Please enlightenment</div><div><br></div><div>Thank you </div><div><br></div><div><br></div><div><br></div></div>
</blockquote></div>