mbedtls/programs
Hanno Becker adfa64f0c4 Abort idle-loop in ssl_server2 if sockets gets invalid
Previously, the idling loop in ssl_server2 didn't check whether
the underlying call to mbedtls_net_poll signalled that the socket
became invalid. This had the consequence that during idling, the
server couldn't be terminated through a SIGTERM, as the corresponding
handler would only close the sockets and expect the remainder of
the program to shutdown gracefully as a consequence of this.
This was subsequently attempted to be fixed through a change
in ssl-opt.sh by terminating the server through a KILL signal,
which however lead to other problems when the latter was run
under valgrind.

This commit changes the idling loop in ssl_server2 and ssl_client2
to obey the return code of mbedtls_net_poll and gracefully shutdown
if an error occurs, e.g. because the socket was closed.

As a consequence, the server termination via a KILL signal in
ssl-opt.sh is no longer necessary, with the previous `kill; wait`
pattern being sufficient. The commit reverts the corresponding
change.
2018-03-15 11:43:41 +00:00
..
aes Correct comment 2017-07-28 22:28:08 +01:00
hash Put clang analyzer fix inside __clang_analyzer__ guard 2016-05-12 12:46:02 +01:00
pkey Minor: Fix typos in program comments 2017-07-27 21:44:33 +01:00
random Change main license to Apache 2.0 2015-09-04 14:21:07 +02:00
ssl Abort idle-loop in ssl_server2 if sockets gets invalid 2018-03-15 11:43:41 +00:00
test Resolve integer type conversion problem on MSVC 2017-12-06 08:37:39 +00:00
util Change main license to Apache 2.0 2015-09-04 14:21:07 +02:00
x509 Add extra compilation conditions to X.509 samples 2016-10-13 13:52:00 +01:00
.gitignore Add new program to gitignore 2015-11-02 06:34:29 +09:00
CMakeLists.txt - Added missing subdirectory line for util 2012-09-25 08:19:18 +00:00
Makefile Add example program for Curve25519 2015-10-09 12:13:29 +01:00
wince_main.c Change main license to Apache 2.0 2015-09-04 14:21:07 +02:00