<div dir="ltr"><div><div>Hi,<br><br></div><div>I didn't know that, I'll upgrade to the latest otp.<br></div><div><br></div>Thank you,<br><br></div>Bogdan<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 27, 2014 at 2:49 PM, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you are using 17.3 you need to update to 17.3.2 or above. 17.3 shipped with a broken SSL client and the OTP team didn't deem worthwhile to issue an official patch.<span class=""><br>
<br>
On 11/27/2014 02:38 PM, Bogdan Andu wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi,<br>
<br>
I am trying to connet to a site using https protocol and I get error:<br>
$ erl -noshell -s inets -s ssl   -eval 'ok= httpc:request(get,<br>
{"<a href="https://github.com/rebar/rebar/wiki/rebar" target="_blank">https://github.com/rebar/<u></u>rebar/wiki/rebar</a>", []}, [], [{stream,<br>
"./rebar"}])'   -s init stop<br>
<br>
<br>
{"init terminating in<br>
do_boot",{{badmatch,{error,{<u></u>failed_connect,[{to_address,{"<a href="http://github.com" target="_blank"><u></u>github.com</a><br></span>
<<a href="http://github.com" target="_blank">http://github.com</a>>",443}},{<u></u>inet,[inet],{eoptions,{{{<u></u>badmatch,<<0<span class=""><br>
bytes>>},[{ssl_handshake,dec_<u></u>hello_extensions,2,[{file,"<u></u>ssl_handshake.erl"},{line,<u></u>1737}]},{ssl_handshake,decode_<u></u>handshake,3,[{file,"ssl_<u></u>handshake.erl"},{line,926}]},{<u></u>tls_handshake,get_tls_<u></u>handshake_aux,3,[{file,"tls_<u></u>handshake.erl"},{line,155}]},{<u></u>tls_connection,next_state,4,[{<u></u>file,"tls_connection.erl"},{<u></u>line,433}]},{gen_fsm,handle_<u></u>msg,7,[{file,"gen_fsm.erl"},{<u></u>line,503}]},{proc_lib,init_p_<u></u>do_apply,3,[{file,"proc_lib.<u></u>erl"},{line,237}]}]},{gen_fsm,<u></u>sync_send_all_state_event,[<0.<u></u>54.0>,{start,infinity},<u></u>infinity]}}}}]}}},[{erl_eval,<u></u>expr,3,[]}]}}<br>
<br>
I fed the ssl versions options to ssl option in httpc:<br>
<br>
$ erl -noshell -s inets -s ssl -ssl protocol_versions '[tlsv1]'   -eval<br>
'ok= httpc:request(get, {"<a href="https://github.com/rebar/rebar/wiki/rebar" target="_blank">https://github.com/rebar/<u></u>rebar/wiki/rebar</a>",<br>
[]}, [{ssl, [ {versions, [tlsv1]} ]}], [{stream, "./rebar"}])'   -s init<br>
stop<br>
<br>
and  I get the same error.<br>
<br>
</span><a href="http://githum.com" target="_blank">githum.com</a> <<a href="http://githum.com" target="_blank">http://githum.com</a>> does not serves sslv3 connections<br>
anymore, but <a href="http://google.com" target="_blank">google.com</a> <<a href="http://google.com" target="_blank">http://google.com</a>> does and I get the same<div><div class="h5"><br>
error (more detailed) :<br>
<br>
=ERROR REPORT==== 27-Nov-2014::14:36:42 ===<br>
** State machine <0.54.0> terminating<br>
** Last message in was {tcp,#Port<0.1310>,<br>
<br>
<<22,3,1,0,93,2,0,0,89,3,1,84,<u></u>119,26,218,49,140,<br>
<br>
143,214,55,227,58,228,149,69,<u></u>14,208,108,222,237,<br>
<br>
222,62,130,116,69,128,135,31,<u></u>62,197,66,236,180,<br>
<br>
32,177,252,205,17,16,73,136,<u></u>136,192,180,178,231,<br>
<br>
184,31,16,165,117,167,10,94,<u></u>112,148,137,123,19,<br>
<br>
218,177,209,242,30,105,160,<u></u>192,7,0,0,17,0,0,0,0,<br>
<br>
255,1,0,1,0,0,11,0,4,3,0,1,2,<u></u>22,3,1,14,78,11,0,<br>
<br>
14,74,0,14,71,0,6,201,48,130,<u></u>6,197,48,130,5,173,<br>
<br>
160,3,2,1,2,2,8,37,174,101,<u></u>117,232,1,104,64,48,<br>
<br>
13,6,9,42,134,72,134,247,13,1,<u></u>1,5,5,0,48,73,49,<br>
<br>
11,48,9,6,3,85,4,6,19,2,85,83,<u></u>49,19,48,17,6,3,<br>
<br>
85,4,10,19,10,71,111,111,103,<u></u>108,101,32,73,110,<br>
<br>
99,49,37,48,35,6,3,85,4,3,19,<u></u>28,71,111,111,103,<br>
<br>
108,101,32,73,110,116,101,114,<u></u>110,101,116,32,65,<br>
<br>
117,116,104,111,114,105,116,<u></u>121,32,71,50,48,30,<br>
<br>
23,13,49,52,49,49,50,48,48,57,<u></u>50,57,49,52,90,23,<br>
                               13,49,53,48,50,49,56,48,48,48,<u></u>48,48,48,90,48,<br>
<br>
102,49,11,48,9,6,3,85,4,6,19,<u></u>2,85,83,49,19,48,<br>
<br>
17,6,3,85,4,8,12,10,67,97,108,<u></u>105,102,111,114,<br>
<br>
110,105,97,49,22,48,20,6,3,85,<u></u>4,7,12,13,77,111,<br>
<br>
117,110,116,97,105,110,32,86,<u></u>105,101,119,49,19,<br>
<br>
48,17,6,3,85,4,10,12,10,71,<u></u>111,111,103,108,101,<br>
<br>
32,73,110,99,49,21,48,19,6,3,<u></u>85,4,3,12,12,42,46,<br>
<br>
103,111,111,103,108,101,46,99,<u></u>111,109,48,89,48,<br>
<br>
19,6,7,42,134,72,206,61,2,1,6,<u></u>8,42,134,72,206,<br>
<br>
61,3,1,7,3,66,0,4,239,17,2,30,<u></u>58,209,122,37,213,<br>
<br>
224,230,99,232,174,177,189,<u></u>137,205,210,61,217,<br>
<br>
56,170,25,54,178,25,237,226,<u></u>204,35,216,210,186,<br>
                               50,69,44,117,245,182,108,110,<u></u>144,22,136,1,44,<br>
<br>
223,216,101,244,211,3,91,5,<u></u>143,64,182,1,108,149,<br>
<br>
202,14,212,163,130,4,93,48,<u></u>130,4,89,48,29,6,3,<br>
<br>
85,29,37,4,22,48,20,6,8,43,6,<u></u>1,5,5,7,3,1,6,8,43,<br>
<br>
6,1,5,5,7,3,2,48,130,3,38,6,3,<u></u>85,29,17,4,130,3,<br>
<br>
29,48,130,3,25,130,12,42,46,<u></u>103,111,111,103,108,<br>
<br>
101,46,99,111,109,130,13,42,<u></u>46,97,110,100,114,<br>
<br>
111,105,100,46,99,111,109,130,<u></u>22,42,46,97,112,<br>
<br>
112,101,110,103,105,110,101,<u></u>46,103,111,111,103,<br>
<br>
108,101,46,99,111,109,130,18,<u></u>42,46,99,108,111,<br>
                               117,100,46,103,111,111,103,<u></u>108,101,46,99,111,<br>
<br>
109,130,22,42,46,103,111,111,<u></u>103,108,101,45,97,<br>
<br>
110,97,108,121,116,105,99,115,<u></u>46,99,111,109,130,<br>
<br>
11,42,46,103,111,111,103,108,<u></u>101,46,99,97,130,<br>
<br>
11,42,46,103,111,111,103,108,<u></u>101,46,99,108,130,<br>
<br>
14,42,46,103,111,111,103,108,<u></u>101,46,99,111,46,<br>
<br>
105,110,130,14,42,46,103,111,<u></u>111,103,108,101,46,<br>
<br>
99,111,46,106,112,130,14,42,<u></u>46,103,111,111,103,<br>
<br>
108,101,46,99,111,46,117,107,<u></u>130,15,42,46,103,<br>
<br>
111,111,103,108,101,46,99,111,<u></u>109,46,97,114,130,<br>
<br>
15,42,46,103,111,111,103,108,<u></u>101,46,99,111,109,<br>
<br>
46,97,117,130,15,42,46,103,<u></u>111,111,103,108,101,<br>
                               46,99,111,109,46,98,114,130,<u></u>15,42,46,103,111,<br>
<br>
111,103,108,101,46,99,111,109,<u></u>46,99,111,130,15,<br>
<br>
42,46,103,111,111,103,108,101,<u></u>46,99,111,109,46,<br>
<br>
109,120,130,15,42,46,103,111,<u></u>111,103,108,101,46,<br>
<br>
99,111,109,46,116,114,130,15,<u></u>42,46,103,111,111,<br>
<br>
103,108,101,46,99,111,109,46,<u></u>118,110,130,11,42,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>100,101,130,11,42,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>101,115,130,11,42,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>102,114,130,11,42,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>104,117,130,11,42,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>105,116,130,11,42,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>110,108,130,11,42,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>112,108,130,11,42,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>112,116,130,18,42,<br>
                               46,103,111,111,103,108,101,97,<u></u>100,97,112,105,<br>
<br>
115,46,99,111,109,130,15,42,<u></u>46,103,111,111,103,<br>
<br>
108,101,97,112,105,115,46,99,<u></u>110,130,20,42,46,<br>
<br>
103,111,111,103,108,101,99,<u></u>111,109,109,101,114,<br>
<br>
99,101,46,99,111,109,130,17,<u></u>42,46,103,111,111,<br>
<br>
103,108,101,118,105,100,101,<u></u>111,46,99,111,109,<br>
                               130,12,42,46,103,115,116,97,<u></u>116,105,99,46,99,<br>
<br>
110,130,13,42,46,103,115,116,<u></u>97,116,105,99,46,<br>
                               99,111,109,130,10,42,46,103,<u></u>118,116,49,46,99,<br>
<br>
111,109,130,10,42,46,103,118,<u></u>116,50,46,99,111,<br>
<br>
109,130,20,42,46,109,101,116,<u></u>114,105,99,46,103,<br>
<br>
115,116,97,116,105,99,46,99,<u></u>111,109,130,12,42,<br>
<br>
46,117,114,99,104,105,110,46,<u></u>99,111,109,130,16,<br>
<br>
42,46,117,114,108,46,103,111,<u></u>111,103,108,101,46,<br>
<br>
99,111,109,130,22,42,46,121,<u></u>111,117,116,117,98,<br>
<br>
101,45,110,111,99,111,111,107,<u></u>105,101,46,99,111,<br>
<br>
109,130,13,42,46,121,111,117,<u></u>116,117,98,101,46,<br>
<br>
99,111,109,130,22,42,46,121,<u></u>111,117,116,117,98,<br>
<br>
101,101,100,117,99,97,116,105,<u></u>111,110,46,99,111,<br>
<br>
109,130,11,42,46,121,116,105,<u></u>109,103,46,99,111,<br>
<br>
109,130,11,97,110,100,114,111,<u></u>105,100,46,99,111,<br>
                               109,130,4,103,46,99,111,130,6,<u></u>103,111,111,46,<br>
                               103,108,130,20,103,111,111,<u></u>103,108,101,45,97,<br>
<br>
110,97,108,121,116,105,99,115,<u></u>46,99,111,109,130,<br>
<br>
10,103,111,111,103,108,101,46,<u></u>99,111,109,130,18,<br>
<br>
103,111,111,103,108,101,99,<u></u>111,109,109,101,114,<br>
<br>
99,101,46,99,111,109,130,10,<u></u>117,114,99,104,105,<br>
<br>
110,46,99,111,109,130,8,121,<u></u>111,117,116,117,46,<br>
<br>
98,101,130,11,121,111,117,116,<u></u>117,98,101,46,99,<br>
<br>
111,109,130,20,121,111,117,<u></u>116,117,98,101,101,<br>
<br>
100,117,99,97,116,105,111,110,<u></u>46,99,111,109,48,<br>
<br>
11,6,3,85,29,15,4,4,3,2,7,128,<u></u>48,104,6,8,43,6,1,<br>
<br>
5,5,7,1,1,4,92,48,90,48,43,6,<u></u>8,43,6,1,5,5,7,48,<br>
<br>
2,134,31,104,116,116,112,58,<u></u>47,47,112,107,105,<br>
<br>
46,103,111,111,103,108,101,46,<u></u>99,111,109,47,71,<br>
<br>
73,65,71,50,46,99,114,116,48,<u></u>43,6,8,43,6,1,5,5,<br>
<br>
7,48,1,134,31,104,116,116,112,<u></u>58,47,47,99,108,<br>
<br>
105,101,110,116,115,49,46,103,<u></u>111,111,103,108,<br>
<br>
101,46,99,111,109,47,111,99,<u></u>115,112,48,29,6,3,<br>
<br>
85,29,14,4,22,4,20,94,50,174,<u></u>238,148,244,84,157,<br>
<br>
175,208,233,225,119,147,54,<u></u>144,110,147,101,106,<br>
                               48,12,6,3,85,29,19,1>>}<br>
** When State == hello<br>
**      Data  == [{data,<br>
                       [{"StateData",<br>
                         {state,client,<br>
                             {#Ref<0.0.0.55>,<0.50.0>},<br>
<br>
gen_tcp,tls_connection,tcp,<u></u>tcp_closed,tcp_error,<br>
                             "<a href="http://google.com" target="_blank">google.com</a><br></div></div>
<<a href="http://google.com" target="_blank">http://google.com</a>>",443,#<u></u>Port<0.1310>,<div><div class="h5"><br>
                             {ssl_options,tls,<br>
                                 [{3,1}],<br>
                                 verify_none,<br>
                                 {#Fun<ssl.7.50551058>,[]},<br>
<br>
#Fun<ssl.8.50551058>,false,<u></u>false,undefined,1,<br>
<br>
<<>>,"***",<<>>,"***","***","*<u></u>**",<<>>,"***",<br>
                                 undefined,undefined,"***","***<u></u>",<br>
                                 [<<"�\n">>,<br>
                                  <<192,20>>,<br>
                                  <<0,57>>,<br>
                                  <<0,56>>,<br>
                                  <<192,5>>,<br>
                                  <<192,15>>,<br>
                                  <<0,53>>,<br>
                                  <<"�\b">>,<br>
                                  <<192,18>>,<br>
                                  <<0,22>>,<br>
                                  <<0,19>>,<br>
                                  <<192,3>>,<br>
                                  <<"�\r">>,<br>
                                  <<0,10>>,<br>
                                  <<"�\t">>,<br>
                                  <<192,19>>,<br>
                                  <<0,51>>,<br>
                                  <<0,50>>,<br>
                                  <<192,4>>,<br>
                                  <<192,14>>,<br>
                                  <<0,47>>,<br>
                                  <<192,7>>,<br>
                                  <<192,17>>,<br>
                                  <<0,5>>,<br>
                                  <<0,4>>,<br>
                                  <<0,21>>,<br>
                                  <<192,2>>,<br>
                                  <<"�\f">>,<br>
                                  <<0,9>>],<br>
                                 #Fun<ssl.1.50551058>,true,<u></u>268435456,false,<br>
                                 undefined,false,undefined,<u></u>undefined,true,<br>
                                 undefined,false},<br>
                             {socket_options,binary,0,0,0,<u></u>false},<br>
                             "***","***","***",12306,"***",<u></u>24597,<br>
                             ssl_session_cache,<br>
                             {3,1},<br>
                             false,undefined,<br>
                             {undefined,undefined},<br>
<br>
undefined,undefined,"***","***<u></u>","***",undefined,<br>
<br>
"***","***","***",16403,#Ref<<u></u>0.0.0.57>,undefined,<br>
                             "***",<br>
                             {false,first},<br>
                             {<0.50.0>,#Ref<0.0.0.54>},<br>
                             undefined,<br>
                             {[],[]},<br>
                             false,true,false,false,<u></u>undefined,undefined,<br>
                             undefined}}]}]<br>
** Reason for termination =<br>
** {{badmatch,<<>>},<br>
     [{ssl_handshake,dec_hello_<u></u>extensions,2,<br>
                     [{file,"ssl_handshake.erl"},{<u></u>line,1737}]},<br>
      {ssl_handshake,decode_<u></u>handshake,3,<br>
                     [{file,"ssl_handshake.erl"},{<u></u>line,926}]},<br>
      {tls_handshake,get_tls_<u></u>handshake_aux,3,<br>
                     [{file,"tls_handshake.erl"},{<u></u>line,155}]},<br>
<br>
{tls_connection,next_state,4,[<u></u>{file,"tls_connection.erl"},{<u></u>line,433}]},<br>
      {gen_fsm,handle_msg,7,[{file,"<u></u>gen_fsm.erl"},{line,503}]},<br>
      {proc_lib,init_p_do_apply,3,[{<u></u>file,"proc_lib.erl"},{line,<u></u>237}]}]}<br>
<br>
<br>
why I cannot connect to a https site?<br>
<br>
Bogdan<br>
<br>
<br>
<br></div></div><span class="">
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
<br>
</span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Loïc Hoguin<br>
<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br>
</font></span></blockquote></div><br></div>