Return a fatal error if application data is encountered during shutdown
authorMatt Caswell <matt@openssl.org>
Mon, 25 Jun 2018 13:51:11 +0000 (14:51 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 27 Jun 2018 09:03:37 +0000 (10:03 +0100)
commit358ffa05cd3a088822c7d06256bc87516d918798
tree59682167c740c52c35fa4b55b859cee2499bc16b
parentba70904949d2f9eec160043bf9a97182b33a2b82
Return a fatal error if application data is encountered during shutdown

Currently if you encounter application data while waiting for a
close_notify from the peer, and you have called SSL_shutdown() then
you will get a -1 return (fatal error) and SSL_ERROR_SYSCALL from
SSL_get_error(). This isn't accurate (it should be SSL_ERROR_SSL) and
isn't persistent (you can call SSL_shutdown() again and it might then work).

We change this into a proper fatal error that is persistent.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/6340)
crypto/err/openssl.txt
include/openssl/sslerr.h
ssl/record/rec_layer_s3.c
ssl/ssl_err.c
test/sslapitest.c