aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-03-26 10:24:24 +0100
committerLoïc Hoguin <[email protected]>2020-03-26 10:24:24 +0100
commitd9b833fcc9e862399e0e0e8aa624c611d71aaaed (patch)
tree0853b85f22ed40c86326e9d64d00f0c02ce1b39a
parent3ff117e9ab17488662c7ef75392e3afa62838028 (diff)
downloadranch-d9b833fcc9e862399e0e0e8aa624c611d71aaaed.tar.gz
ranch-d9b833fcc9e862399e0e0e8aa624c611d71aaaed.tar.bz2
ranch-d9b833fcc9e862399e0e0e8aa624c611d71aaaed.zip
Fix malformed_handshake_data error in tests on 23/master
-rw-r--r--test/acceptor_SUITE.erl10
1 files 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,