1
0
Fork 0
mirror of https://github.com/bjc/prosody.git synced 2025-04-06 14:47:37 +03:00

util.hashes: Expose OpenSSL version

This commit is contained in:
Kim Alvefur 2021-05-12 01:11:15 +02:00
parent 8048b53d18
commit 654fd45546

View file

@ -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;
}