aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatarLibravatar John Regan <john@jrjrtech.com> 2022-05-04 23:04:06 +0200
committerLibravatarLibravatar John Regan <john@jrjrtech.com> 2022-05-04 23:04:06 +0200
commit708534b83b1c29036081a80d94ac809fb198ef9f (patch)
tree0e855c20cb19312e9535a95dd22a6af5558f7e7f /src
parent58c6315bdb61b2a00d7152e424658da33bf14a49 (diff)
downloadluaossl-708534b83b1c29036081a80d94ac809fb198ef9f.tar.gz
luaossl-708534b83b1c29036081a80d94ac809fb198ef9f.tar.bz2
luaossl-708534b83b1c29036081a80d94ac809fb198ef9f.zip
openssl 3.0.0: use non-deprecated ERR_get_error_all function
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c4
1 files changed, 4 insertions, 0 deletions
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;