diff options
author | daurnimator <quae@daurnimator.com> | 2019-06-12 13:22:56 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2019-06-12 13:22:56 +1000 |
commit | 531d1f3eacbce95dde387f5e803ddf398057377b (patch) | |
tree | f2105b526071924bc099f10ada25f327e37df77c /src | |
parent | 2af5537f91f782bb3d2364eb8706e312b2639ae2 (diff) | |
download | luaossl-531d1f3eacbce95dde387f5e803ddf398057377b.tar.gz luaossl-531d1f3eacbce95dde387f5e803ddf398057377b.tar.bz2 luaossl-531d1f3eacbce95dde387f5e803ddf398057377b.zip |
src/openssl.c: Add LIBRESSL_VERSION_NUMBER version field
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/openssl.c b/src/openssl.c index 95a2939..c59cf22 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -3146,7 +3146,7 @@ static const char opensslconf_no[][20] = { { "" } /* in case nothing is defined above */ }; /* opensslconf_no[] */ -static const auxL_IntegerReg ssleay_version[] = { +static const auxL_IntegerReg openssl_integers[] = { #ifdef SSLEAY_VERSION_NUMBER { "SSLEAY_VERSION_NUMBER", SSLEAY_VERSION_NUMBER }, #endif @@ -3168,6 +3168,19 @@ static const auxL_IntegerReg ssleay_version[] = { #ifdef SSLEAY_DIR { "SSLEAY_DIR", SSLEAY_DIR }, #endif +#ifdef LIBRESSL_VERSION_NUMBER + { "LIBRESSL_VERSION_NUMBER", LIBRESSL_VERSION_NUMBER }, +#endif +#ifdef OPENSSL_VERSION_NUMBER + { "OPENSSL_VERSION_NUMBER", OPENSSL_VERSION_NUMBER }, +#endif +#ifdef LIBRESSL_VERSION_NUMBER + { "VERSION_NUMBER", LIBRESSL_VERSION_NUMBER }, +#elif OPENSSL_VERSION_NUMBER + { "VERSION_NUMBER", OPENSSL_VERSION_NUMBER }, +#else + { "VERSION_NUMBER", SSLEAY_VERSION_NUMBER }, +#endif { NULL, 0 }, }; @@ -3183,10 +3196,7 @@ EXPORT int luaopen__openssl(lua_State *L) { } } - auxL_setintegers(L, ssleay_version); - - auxL_pushinteger(L, OPENSSL_VERSION_NUMBER); - lua_setfield(L, -2, "VERSION_NUMBER"); + auxL_setintegers(L, openssl_integers); lua_pushstring(L, OPENSSL_VERSION_TEXT); lua_setfield(L, -2, "VERSION_TEXT"); @@ -3197,11 +3207,6 @@ EXPORT int luaopen__openssl(lua_State *L) { lua_pushstring(L, SHLIB_VERSION_NUMBER); lua_setfield(L, -2, "SHLIB_VERSION_NUMBER"); -#if defined LIBRESSL_VERSION_NUMBER - auxL_pushinteger(L, LIBRESSL_VERSION_NUMBER); - lua_setfield(L, -2, "LIBRESSL_VERSION_NUMBER"); -#endif - return 1; } /* luaopen__openssl() */ |