Fix an s_server infinite loop
authorMatt Caswell <matt@openssl.org>
Wed, 26 Apr 2017 13:00:35 +0000 (14:00 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 9 May 2017 09:35:33 +0000 (10:35 +0100)
commit068e3d73ce6814879832c9400c10afe2458c2004
treef8c218fd479038825a53e1a9e352c2856adee0c5
parentfa3ed5b2c2b508a6444124fdf12ecbb4898007ed
Fix an s_server infinite loop

Commit c4666bfa changed s_server so that it asked libssl rather than the
underlying socket whether an error is retryable or not on the basis that
libssl has more information. That is true unfortunately the method used
was wrong - it only checks libssl's own internal state rather than both
libssl and the BIO. Should use SSL_get_error() instead.

This issue can cause an infinite loop because some errors could appear as
retryable when in fact they are not.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3317)
apps/s_server.c