<div dir="ltr">Hello,<div>this patch for ssl-6.0/src/ssl_cipher.erl should help</div><div>Another solution is to switch to modern Erlang 18.0, 19.0, ...<br><div><div><br></div><div><pre style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:11.9px;margin-top:0px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(247,247,247);border-radius:3px;color:rgb(51,51,51);margin-bottom:0px"><code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:11.9px;padding:0px;margin:0px;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:transparent;border-radius:3px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit;word-wrap:normal">--- ssl_cipher.erl     2017-01-28 17:47:08.728720668 +0300
+++ ssl_cipher.erl.new  2017-01-28 17:46:40.860480295 +0300
@@ -1209,7 +1209,9 @@
 hash_algorithm(?SHA224) -> sha224;
 hash_algorithm(?SHA256) -> sha256;
 hash_algorithm(?SHA384) -> sha384;
-hash_algorithm(?SHA512) -> sha512.
+hash_algorithm(?SHA512) -> sha512;
+hash_algorithm(Other)  when is_integer(Other) andalso ((Other >= 7) and (Other =< 223)) -> unassigned;
+hash_algorithm(Other)  when is_integer(Other) andalso ((Other >= 224) and (Other =< 255)) -> Other.
 
 sign_algorithm(anon)  -> ?ANON;
 sign_algorithm(rsa)   -> ?RSA;
@@ -1218,7 +1220,9 @@
 sign_algorithm(?ANON) -> anon;
 sign_algorithm(?RSA) -> rsa;
 sign_algorithm(?DSA) -> dsa;
-sign_algorithm(?ECDSA) -> ecdsa.
+sign_algorithm(?ECDSA) -> ecdsa;
+sign_algorithm(Other) when is_integer(Other) andalso ((Other >= 4) and (Other =< 223)) -> unassigned;
+sign_algorithm(Other) when is_integer(Other) andalso ((Other >= 224) and (Other =< 255)) -> Other.
 
 hash_size(null) ->
     0;
----------------</code></pre></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 8:47 PM, Frank Muller <span dir="ltr"><<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi guys,<div><br></div><div>I'm seeing these SSL errors in the app's logs:</div><div><br></div><div><span style="font-family:UICTFontTextStyleBody;font-size:17px">2017-02-08 12:38:55.227 [error] <0.577.0> Ranch listener https terminated with reason: {{function_clause,[{ssl_<wbr>cipher,hash_algorithm,"\b",[{<wbr>file,"ssl_cipher.erl"},{line,<wbr>1199}]},{ssl_handshake,'-dec_<wbr>hello_extensions/2-lc$^0/1-1-'<wbr>,1,[{file,"ssl_handshake.erl"}<wbr>,{line,1706}]},{ssl_handshake,<wbr>'-dec_hello_extensions/2-lc$^<wbr>0/1-1-',1,[{file,"ssl_<wbr>handshake.erl"},{line,1707}]},<wbr>{ssl_handshake,dec_hello_<wbr>extensions,2,[{file,"ssl_<wbr>handshake.erl"},{line,1706}]},<wbr>{tls_handshake,decode_<wbr>handshake,3,[{file,"tls_<wbr>handshake.erl"},{line,206}]},{<wbr>tls_handshake,get_tls_<wbr>handshake_aux,3,[{file,"tls_<wbr>handsha..."},...]},...]},...}</span><br style="font-family:UICTFontTextStyleBody;font-size:17px"><span style="font-family:UICTFontTextStyleBody;font-size:17px">2017-02-08 12:38:55.228 [error] <0.576.0> Ranch listener https terminated with reason: {{function_clause,[{ssl_<wbr>cipher,hash_algorithm,"\b",[{<wbr>file,"ssl_cipher.erl"},{line,<wbr>1199}]},{ssl_handshake,'-dec_<wbr>hello_extensions/2-lc$^0/1-1-'<wbr>,1,[{file,"ssl_handshake.erl"}<wbr>,{line,1706}]},{ssl_handshake,<wbr>'-dec_hello_extensions/2-lc$^<wbr>0/1-1-',1,[{file,"ssl_<wbr>handshake.erl"},{line,1707}]},<wbr>{ssl_handshake,dec_hello_<wbr>extensions,2,[{file,"ssl_<wbr>handshake.erl"},{line,1706}]},<wbr>{tls_handshake,decode_<wbr>handshake,3,[{file,"tls_<wbr>handshake.erl"},{line,206}]},{<wbr>tls_handshake,get_tls_<wbr>handshake_aux,3,[{file,"tls_<wbr>handsha..."},...]},...]},...}</span><br style="font-family:UICTFontTextStyleBody;font-size:17px"><span style="font-family:UICTFontTextStyleBody;font-size:17px">2017-02-08 12:38:55.235 [error] <0.578.0> gen_fsm <0.578.0> in state hello terminated with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1199</span><br style="font-family:UICTFontTextStyleBody;font-size:17px"><span style="font-family:UICTFontTextStyleBody;font-size:17px">2017-02-08 12:38:55.235 [error] <0.578.0> CRASH REPORT Process <0.578.0> with 0 neighbours exited with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1199 in gen_fsm:terminate/7 line 611</span><br style="font-family:UICTFontTextStyleBody;font-size:17px"></div><div><br></div><div><span style="font-family:UICTFontTextStyleBody;font-size:17px">I'm using Erlang 17.5 under Linux.</span></div><div><span style="font-family:UICTFontTextStyleBody;font-size:17px">Can anyone help on this please?</span></div><div><span style="font-family:UICTFontTextStyleBody;font-size:17px"><br></span></div><div><span style="font-family:UICTFontTextStyleBody;font-size:17px">Thanks in advance. </span></div><span class="HOEnZb"><font color="#888888"><div><font face="UICTFontTextStyleBody"><span style="font-size:17px">/Frank</span></font></div>
</font></span><br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>