diff options
author | Ingela Anderton Andin <[email protected]> | 2018-08-09 09:28:48 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-08-09 09:28:48 +0200 |
commit | 2c19a6010e9576e1979216863b5f63ebe302bf69 (patch) | |
tree | a6b127e3647ecd67a19e55ade547f4d199349d91 /lib/ssl/test | |
parent | d3eebb798cd0aac25f3b66e98aca3a0340017479 (diff) | |
parent | ca9f2fe073b587e70b5502c87be3eca6f72ddd57 (diff) | |
download | otp-2c19a6010e9576e1979216863b5f63ebe302bf69.tar.gz otp-2c19a6010e9576e1979216863b5f63ebe302bf69.tar.bz2 otp-2c19a6010e9576e1979216863b5f63ebe302bf69.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/ssl/test')
-rw-r--r-- | lib/ssl/test/ssl_basic_SUITE.erl | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl index 39ccce2452..480988b6e4 100644 --- a/lib/ssl/test/ssl_basic_SUITE.erl +++ b/lib/ssl/test/ssl_basic_SUITE.erl @@ -243,7 +243,8 @@ error_handling_tests()-> recv_active, recv_active_once, recv_error_handling, - call_in_error_state + call_in_error_state, + close_in_error_state ]. error_handling_tests_tls()-> @@ -4036,6 +4037,33 @@ run_error_server([ Pid | Opts]) -> %%-------------------------------------------------------------------- +close_in_error_state() -> + [{doc,"Special case of closing socket in error state"}]. +close_in_error_state(Config) when is_list(Config) -> + ServerOpts0 = ssl_test_lib:ssl_options(server_opts, Config), + ServerOpts = [{cacertfile, "foo.pem"} | proplists:delete(cacertfile, ServerOpts0)], + ClientOpts = ssl_test_lib:ssl_options(client_opts, Config), + _ = spawn_link(?MODULE, run_error_server_close, [[self() | ServerOpts]]), + receive + {_Pid, Port} -> + spawn_link(?MODULE, run_client_error, [[Port, ClientOpts]]) + end, + receive + ok -> + ok; + Other -> + ct:fail(Other) + end. + +run_error_server_close([Pid | Opts]) -> + {ok, Listen} = ssl:listen(0, Opts), + {ok,{_, Port}} = ssl:sockname(Listen), + Pid ! {self(), Port}, + {ok, Socket} = ssl:transport_accept(Listen), + Pid ! ssl:close(Socket). + +%%-------------------------------------------------------------------- + rizzo() -> [{doc, "Test that there is a 1/n-1-split for non RC4 in 'TLS < 1.1' as it is vunrable to Rizzo/Dungon attack"}]. |