From 708534b83b1c29036081a80d94ac809fb198ef9f Mon Sep 17 00:00:00 2001 From: John Regan Date: Wed, 4 May 2022 23:04:06 +0200 Subject: openssl 3.0.0: use non-deprecated ERR_get_error_all function --- src/openssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openssl.c b/src/openssl.c index 5b17335..814d95c 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -1475,7 +1475,11 @@ static const char *auxL_pusherror(lua_State *L, int error, const char *fun) { if (!ERR_peek_error()) return lua_pushliteral(L, "oops: no OpenSSL errors set"); +#if OPENSSL_PREREQ(3,0,0) + code = ERR_get_error_all(&path, &line, NULL, NULL, NULL); +#else code = ERR_get_error_line(&path, &line); +#endif if ((file = strrchr(path, '/'))) { ++file; -- cgit v1.2.3-59-g8ed1b