aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_basic_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-11-05 11:11:27 +0100
committerIngela Anderton Andin <[email protected]>2018-11-05 13:19:19 +0100
commite64822b68ec1f06481af5ea776273b6dbb526d63 (patch)
treeba87b01ee86e26d0fef001b4aed4074edda5caa3 /lib/ssl/test/ssl_basic_SUITE.erl
parent8f4eb75f5a8d3f76d4e5e1c7d56024c727358ac7 (diff)
downloadotp-e64822b68ec1f06481af5ea776273b6dbb526d63.tar.gz
otp-e64822b68ec1f06481af5ea776273b6dbb526d63.tar.bz2
otp-e64822b68ec1f06481af5ea776273b6dbb526d63.zip
ssl: controlling_process should be allowed on transpor_accept sockets along
with handshake Fix of commit 68d9244ae33e5eea36250c3bb9ffe046a4db5647
Diffstat (limited to 'lib/ssl/test/ssl_basic_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_basic_SUITE.erl27
1 files changed, 25 insertions, 2 deletions
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl
index f474d7f978..6f668f0c00 100644
--- a/lib/ssl/test/ssl_basic_SUITE.erl
+++ b/lib/ssl/test/ssl_basic_SUITE.erl
@@ -245,7 +245,8 @@ error_handling_tests()->
recv_error_handling,
call_in_error_state,
close_in_error_state,
- abuse_transport_accept_socket
+ abuse_transport_accept_socket,
+ controlling_process_transport_accept_socket
].
error_handling_tests_tls()->
@@ -4057,7 +4058,7 @@ close_in_error_state(Config) when is_list(Config) ->
end.
%%--------------------------------------------------------------------
abuse_transport_accept_socket() ->
- [{doc,"Only ssl:handshake is allowed for transport_accept:sockets"}].
+ [{doc,"Only ssl:handshake and ssl:controlling_process is allowed for transport_accept:sockets"}].
abuse_transport_accept_socket(Config) when is_list(Config) ->
ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
@@ -4077,6 +4078,28 @@ abuse_transport_accept_socket(Config) when is_list(Config) ->
ssl_test_lib:close(Server),
ssl_test_lib:close(Client).
+
+%%--------------------------------------------------------------------
+controlling_process_transport_accept_socket() ->
+ [{doc,"Only ssl:handshake and ssl:controlling_process is allowed for transport_accept:sockets"}].
+controlling_process_transport_accept_socket(Config) when is_list(Config) ->
+ ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server = ssl_test_lib:start_server_transport_control([{node, ServerNode},
+ {port, 0},
+ {from, self()},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ _Client = ssl_test_lib:start_client_error([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {options, ClientOpts}]),
+ ssl_test_lib:check_result(Server, ok),
+ ssl_test_lib:close(Server).
+
%%--------------------------------------------------------------------
run_error_server_close([Pid | Opts]) ->
{ok, Listen} = ssl:listen(0, Opts),