diff options
author | Ingela Anderton Andin <[email protected]> | 2011-12-07 16:02:03 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2011-12-07 16:02:03 +0100 |
commit | ffcee281f6d804bc4370ed2ab6671dc234cb5e92 (patch) | |
tree | ec32e55b4a8b9846bf6d0d9330a57db855e79adc /lib/ssl | |
parent | 5a76ff08744d68494937b736d6aa29d26aeed1e8 (diff) | |
parent | 0314791bcccc12fe5ece51b90bb0c69aa949b29e (diff) | |
download | otp-ffcee281f6d804bc4370ed2ab6671dc234cb5e92.tar.gz otp-ffcee281f6d804bc4370ed2ab6671dc234cb5e92.tar.bz2 otp-ffcee281f6d804bc4370ed2ab6671dc234cb5e92.zip |
Merge branch 'ia/ssl/tcp-delivery-problem-may-cause-econnaborted'
* ia/ssl/tcp-delivery-problem-may-cause-econnaborted:
If if TLS/SSL-close-notify message is not delivered you can get econnaborted error.
Diffstat (limited to 'lib/ssl')
-rw-r--r-- | lib/ssl/test/ssl_basic_SUITE.erl | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl index 45da9ac25b..527263363c 100644 --- a/lib/ssl/test/ssl_basic_SUITE.erl +++ b/lib/ssl/test/ssl_basic_SUITE.erl @@ -3079,42 +3079,47 @@ invalid_signature_client(Config) when is_list(Config) -> tcp_delivery_workaround(Server, ServerMsg, Client, ClientMsg) -> receive {Server, ServerMsg} -> - receive - {Client, ClientMsg} -> - ok; - {Client, {error,closed}} -> - test_server:format("client got close"), - ok; - Unexpected -> - test_server:fail(Unexpected) - end; + client_msg(Client, ClientMsg); {Client, ClientMsg} -> - receive - {Server, ServerMsg} -> - ok; - Unexpected -> - test_server:fail(Unexpected) - end; + server_msg(Server, ServerMsg); {Client, {error,closed}} -> - receive - {Server, ServerMsg} -> - ok; - Unexpected -> - test_server:fail(Unexpected) - end; + server_msg(Server, ServerMsg); {Server, {error,closed}} -> - receive - {Client, ClientMsg} -> - ok; - {Client, {error,closed}} -> - test_server:format("client got close"), - ok; - Unexpected -> - test_server:fail(Unexpected) - end; + client_msg(Client, ClientMsg); + {Client, {error, esslconnect}} -> + server_msg(Server, ServerMsg); + {Server, {error, esslaccept}} -> + client_msg(Client, ClientMsg) + end. + +client_msg(Client, ClientMsg) -> + receive + {Client, ClientMsg} -> + ok; + {Client, {error,closed}} -> + test_server:format("client got close"), + ok; + {Client, {error, esslconnect}} -> + test_server:format("client got econnaborted"), + ok; Unexpected -> test_server:fail(Unexpected) end. + +server_msg(Server, ServerMsg) -> + receive + {Server, ServerMsg} -> + ok; + {Server, {error,closed}} -> + test_server:format("server got close"), + ok; + {Server, {error, esslaccept}} -> + test_server:format("server got econnaborted"), + ok; + Unexpected -> + test_server:fail(Unexpected) + end. + %%-------------------------------------------------------------------- cert_expired(doc) -> ["Test server with invalid signature"]; |