aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-04-27 11:19:05 +0200
committerIngela Anderton Andin <[email protected]>2018-04-27 11:19:05 +0200
commit59daa58bc73bd402ccc430209ca27b29de21fe00 (patch)
treeb3c6d0c05f6a01ab62a1eb7401cb8d4b0a95985c /lib/ssl
parent85756d20f0e888210fdddc5f8ebed6e84d2b37d6 (diff)
parent62a6217ff9dff0418ae436c68b65a8b64461790a (diff)
downloadotp-59daa58bc73bd402ccc430209ca27b29de21fe00.tar.gz
otp-59daa58bc73bd402ccc430209ca27b29de21fe00.tar.bz2
otp-59daa58bc73bd402ccc430209ca27b29de21fe00.zip
Merge branch 'ingela/ssl/test-cuddle'
* ingela/ssl/test-cuddle: ssl: Handle EXIT messages from test code correctly
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/test/ssl_test_lib.erl10
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl8
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index a9f7dd9675..3a7e844cf8 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -1704,7 +1704,9 @@ supports_ssl_tls_version(sslv2 = Version) ->
Exe = "openssl",
Args = ["s_client", VersionFlag],
Port = ssl_test_lib:portable_open_port(Exe, Args),
- do_supports_ssl_tls_version(Port, "")
+ Bool = do_supports_ssl_tls_version(Port, ""),
+ consume_port_exit(Port),
+ Bool
end;
supports_ssl_tls_version(Version) ->
@@ -1822,6 +1824,12 @@ tls_version('dtlsv1.2' = Atom) ->
tls_version(Atom) ->
tls_record:protocol_version(Atom).
+consume_port_exit(OpenSSLPort) ->
+ receive
+ {'EXIT', OpenSSLPort, _} ->
+ ok
+ end.
+
hardcode_rsa_key(1) ->
#'RSAPrivateKey'{
version = 'two-prime',
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index e8cbf857ef..9c60a6315e 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -1139,7 +1139,7 @@ ssl2_erlang_server_openssl_client(Config) when is_list(Config) ->
OpenSslPort = ssl_test_lib:portable_open_port(Exe, Args),
ct:log("Ports ~p~n", [[erlang:port_info(P) || P <- erlang:ports()]]),
- consume_port_exit(OpenSslPort),
+ ssl_test_lib:consume_port_exit(OpenSslPort),
ssl_test_lib:check_result(Server, {error, {tls_alert, "bad record mac"}}),
process_flag(trap_exit, false).
@@ -1955,12 +1955,6 @@ openssl_client_args(true, Hostname, Port, ServerName) ->
["s_client", "-no_ssl2", "-connect", Hostname ++ ":" ++
integer_to_list(Port), "-servername", ServerName].
-consume_port_exit(OpenSSLPort) ->
- receive
- {'EXIT', OpenSSLPort, _} ->
- ok
- end.
-
hostname_format(Hostname) ->
case lists:member($., Hostname) of
true ->