diff options
author | Ingela Anderton Andin <[email protected]> | 2010-04-29 09:35:14 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-04-29 09:35:14 +0000 |
commit | edd6a676148e4e747604121e69f5cb4f06955663 (patch) | |
tree | c587cf2033ff6918eb8bae961b88c3eb8b497914 /lib/ssl/test/ssl_to_openssl_SUITE.erl | |
parent | 4b87b22ce97abf2759eb551222a862e17c5f4dcb (diff) | |
download | otp-edd6a676148e4e747604121e69f5cb4f06955663.tar.gz otp-edd6a676148e4e747604121e69f5cb4f06955663.tar.bz2 otp-edd6a676148e4e747604121e69f5cb4f06955663.zip |
OTP-8588 Alert and packet handling improvment
Alert handling has been improved to better handle unexpected but valid
messages and the implementation is also changed to avoid timing related
issues that could cause different error messages depending on network
latency. Packet handling was sort of broken but would mostly work as
expected when socket was in binary mode. This has now been fixed.
Diffstat (limited to 'lib/ssl/test/ssl_to_openssl_SUITE.erl')
-rw-r--r-- | lib/ssl/test/ssl_to_openssl_SUITE.erl | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl index cbf0447bf0..186bf52ff6 100644 --- a/lib/ssl/test/ssl_to_openssl_SUITE.erl +++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl @@ -958,7 +958,7 @@ erlang_client_bad_openssl_server(Config) when is_list(Config) -> wait_for_openssl_server(), - Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port}, + Client0 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port}, {host, Hostname}, {from, self()}, {mfa, {?MODULE, server_sent_garbage, []}}, @@ -970,11 +970,22 @@ erlang_client_bad_openssl_server(Config) when is_list(Config) -> test_server:sleep(?SLEEP), - Client ! server_sent_garbage, - - ssl_test_lib:check_result(Client, true), - - ssl_test_lib:close(Client), + Client0 ! server_sent_garbage, + + ssl_test_lib:check_result(Client0, true), + + ssl_test_lib:close(Client0), + + %% Make sure openssl does not hang and leave zombie process + Client1 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port}, + {host, Hostname}, + {from, self()}, + {mfa, {ssl_test_lib, no_result_msg, []}}, + {options, + [{versions, [tlsv1]} | ClientOpts]}]), + + ssl_test_lib:close(Client1), + %% Clean close down! close_port(OpensslPort), process_flag(trap_exit, false), @@ -1055,6 +1066,7 @@ server_sent_garbage(Socket) -> receive server_sent_garbage -> {error, closed} == ssl:send(Socket, "data") + end. wait_for_openssl_server() -> |