diff options
author | Richard Levitte <levitte@openssl.org> | 2019-07-24 13:25:56 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-07-31 06:44:45 +0200 |
commit | add8c8e9647a71cc755dea22490e2075e342624b (patch) | |
tree | 5189711696c4c1b4bc9d6357fbfa00854012ae76 /include | |
parent | ed57f7f93508776b898e4c23b65d67f3479edaf1 (diff) |
ERR: Remove ERR_put_func_error() and reimplement ERR_put_error() as a macro
Also, deprecate ERR_put_error()
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9452)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/err.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/openssl/err.h b/include/openssl/err.h index 7aac9b88d4..142321d2c8 100644 --- a/include/openssl/err.h +++ b/include/openssl/err.h @@ -252,9 +252,14 @@ void ERR_vset_error(int lib, int reason, const char *fmt, va_list args); ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC), \ ERR_set_error) -void ERR_put_error(int lib, int func, int reason, const char *file, int line); -void ERR_put_func_error(int lib, const char *func, int reason, - const char *file, int line); +#if !OPENSSL_API_3 +/* Backward compatibility */ +#define ERR_put_error(lib, func, reason, file, line) \ + (ERR_new(), \ + ERR_set_debug((file), (line), NULL), \ + ERR_set_error((lib), (reason), NULL)) +#endif + void ERR_set_error_data(char *data, int flags); unsigned long ERR_get_error(void); |