Avoid using ERR_put_error() directly in OpenSSL code
authorRichard Levitte <levitte@openssl.org>
Wed, 24 Jul 2019 14:55:32 +0000 (16:55 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 31 Jul 2019 04:45:21 +0000 (06:45 +0200)
commitc3612970465d0a13f2fc5b47bc28ca18516a699d
tree05b18630fed9a1722c6776717fbff7c2d08b85bb
parent036913b1076da41f257c640a5e6230476c647eff
Avoid using ERR_put_error() directly in OpenSSL code

If compiled with 'no-deprecated', ERR_put_error() is undefined.  We
had one spot where we were using it directly, because the file and
line information was passed from elsewhere.

Fortunately, it's possible to use ERR_raise() for that situation, and
call ERR_set_debug() immediately after and thereby override the
information that ERR_raise() stored in the error record.

util/mkerr.pl needed a small adjustment to not generate code that
won't compile in a 'no-deprecated' configuration.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9452)
engines/e_afalg_err.c
engines/e_capi_err.c
engines/e_dasync_err.c
engines/e_ossltest_err.c
ssl/statem/statem.c
util/mkerr.pl