From d9b833fcc9e862399e0e0e8aa624c611d71aaaed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 26 Mar 2020 10:24:24 +0100 Subject: Fix malformed_handshake_data error in tests on 23/master --- test/acceptor_SUITE.erl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/acceptor_SUITE.erl b/test/acceptor_SUITE.erl index 7fc26f4..ce1293a 100644 --- a/test/acceptor_SUITE.erl +++ b/test/acceptor_SUITE.erl @@ -601,7 +601,10 @@ ssl_sni_echo(_) -> ranch_ssl, [{sni_hosts, [{"localhost", Opts}]}], echo_protocol, []), Port = ranch:get_port(Name), - {ok, Socket} = ssl:connect("localhost", Port, [binary, {active, false}, {packet, raw}]), + %% We stick to TLS 1.2 because there seems to be a bug in OTP-23.0rc2 + %% that leads to a malformed_handshake_data error. + {ok, Socket} = ssl:connect("localhost", Port, + [binary, {active, false}, {packet, raw}, {versions, ['tlsv1.2']}]), ok = ssl:send(Socket, <<"SSL Ranch is working!">>), {ok, <<"SSL Ranch is working!">>} = ssl:recv(Socket, 21, 1000), ok = ranch:stop_listener(Name), @@ -618,7 +621,10 @@ ssl_sni_fail(_) -> ranch_ssl, [{sni_hosts, [{"pouet", Opts}]}], echo_protocol, []), Port = ranch:get_port(Name), - {error, _} = ssl:connect("localhost", Port, [binary, {active, false}, {packet, raw}]), + %% We stick to TLS 1.2 because there seems to be a bug in OTP-23.0rc2 + %% that leads to a malformed_handshake_data error. + {error, _} = ssl:connect("localhost", Port, + [binary, {active, false}, {packet, raw}, {versions, ['tlsv1.2']}]), ok = ranch:stop_listener(Name), %% Make sure the listener stopped. {'EXIT', _} = begin catch ranch:get_port(Name) end, -- cgit v1.2.3