Changeset

11562:0becc168f4f9

util.hashes: Expose OpenSSL version
author Kim Alvefur <zash@zash.se>
date Wed, 12 May 2021 01:11:15 +0200
parents 11561:d2f33b8fdc96
children 11563:0983653cbfdf
files util-src/hashes.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/hashes.c	Thu May 13 14:13:07 2021 +0100
+++ b/util-src/hashes.c	Wed May 12 01:11:15 2021 +0200
@@ -172,5 +172,9 @@
 	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;
 }