openssl/test/ossl_shim
Matt Caswell c3114a7732 Set the ossl_shim to auto retry if not running asynchronously
In certain circumstances in the DTLS code we have to drop a record (e.g. if
it is a stale retransmit). We then have to move on to try and read the next
record. Some applications using blocking sockets (e.g. s_server/s_client
will hang if there isn't actually any data to be read from the socket yet).
Others can tolerate this. Therefore SSL_read()/SSL_write() can sometimes
return SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE even when using blocking
sockets. Applications can use the mode SSL_MODE_AUTO_RETRY, to switch this
behaviour off so that we never return unless we have read the data we
wanted to.

Commit ad96225285 fixed a DTLS problem where we always retried even if
SSL_MODE_AUTO_RETRY was not set. However that fix caused the Boring
ossl_shim to fail in some tests because it was relying on the previous
(buggy) behaviour. The ossl_shim should be set into SSL_MODE_AUTO_RETRY if
it is not operating asynchronously to avoid this problem.

[extended tests]

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6216)
2018-05-11 10:29:04 +01:00
..
include/openssl
async_bio.cc Fix invalid function type casts. 2017-12-15 19:33:48 +01:00
async_bio.h
build.info Attempt to fix boringssl tests 2018-03-09 17:23:00 -06:00
ossl_config.json
ossl_shim.cc Set the ossl_shim to auto retry if not running asynchronously 2018-05-11 10:29:04 +01:00
packeted_bio.cc Fix invalid function type casts. 2017-12-15 19:33:48 +01:00
packeted_bio.h Update copyright year 2018-02-13 13:59:25 +00:00
test_config.cc
test_config.h