Make sure build_SYS_str_reasons() preserves errno
authorMatt Caswell <matt@openssl.org>
Wed, 21 Nov 2018 11:44:42 +0000 (11:44 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 10 Dec 2018 10:17:43 +0000 (10:17 +0000)
commit71b1ceffc4c795f5db21861dd1016fbe23a53a53
treebca0e9d4c6a3842cb06b20ed0f4c8783be6a8b9f
parentf2f734d4f9e34643a1d3e5b79d2447cd643519f8
Make sure build_SYS_str_reasons() preserves errno

This function can end up being called during ERR_get_error() if we are
initialising. ERR_get_error() must preserve errno since it gets called via
SSL_get_error(). If that function returns SSL_ERROR_SYSCALL then you are
supposed to inspect errno.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7680)
crypto/err/err.c
e_os.h