aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-05-12 01:11:15 +0200
committerKim Alvefur <zash@zash.se>2021-05-12 01:11:15 +0200
commit654fd45546c648881773c8e4eeb19af52b8af93f (patch)
tree3c2aab245d940b617d35c7f8637cad6105c1a7b6
parent8048b53d183f3e225c85f4ca06e54ebc0b07e058 (diff)
downloadprosody-654fd45546c648881773c8e4eeb19af52b8af93f.tar.gz
prosody-654fd45546c648881773c8e4eeb19af52b8af93f.zip
util.hashes: Expose OpenSSL version
-rw-r--r--util-src/hashes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util-src/hashes.c b/util-src/hashes.c
index 31b52f40..8eefcd6b 100644
--- a/util-src/hashes.c
+++ b/util-src/hashes.c
@@ -172,5 +172,9 @@ LUALIB_API int luaopen_util_hashes(lua_State *L) {
luaL_setfuncs(L, Reg, 0);
lua_pushliteral(L, "-3.14");
lua_setfield(L, -2, "version");
+#ifdef OPENSSL_VERSION
+ lua_pushstring(L, OpenSSL_version(OPENSSL_VERSION));
+ lua_setfield(L, -2, "_LIBCRYPTO_VERSION");
+#endif
return 1;
}