summaryrefslogtreecommitdiffstats
path: root/engines/e_afalg_err.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-07-24 16:55:32 +0200
committerRichard Levitte <levitte@openssl.org>2019-07-31 06:45:21 +0200
commitc3612970465d0a13f2fc5b47bc28ca18516a699d (patch)
tree05b18630fed9a1722c6776717fbff7c2d08b85bb /engines/e_afalg_err.c
parentAdapt the FIPS provider to use the new core error functions (diff)
downloadopenssl-c3612970465d0a13f2fc5b47bc28ca18516a699d.tar.xz
openssl-c3612970465d0a13f2fc5b47bc28ca18516a699d.zip
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)
Diffstat (limited to 'engines/e_afalg_err.c')
-rw-r--r--engines/e_afalg_err.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/e_afalg_err.c b/engines/e_afalg_err.c
index c436f10a41..4db6d660c9 100644
--- a/engines/e_afalg_err.c
+++ b/engines/e_afalg_err.c
@@ -66,5 +66,6 @@ static void ERR_AFALG_error(int function, int reason, char *file, int line)
{
if (lib_code == 0)
lib_code = ERR_get_next_error_library();
- ERR_PUT_error(lib_code, function, reason, file, line);
+ ERR_raise(lib_code, reason);
+ ERR_set_debug(file, line, NULL);
}