aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/openssl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 9fc67c7..99a1ec0 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -81,7 +81,7 @@
#endif
#ifndef HAVE_SSL_CTX_SET_ALPN_PROTOS
-#define HAVE_SSL_CTX_SET_ALPN_PROTOS (OPENSSL_VERSION_NUMBER >= 0x1000200fL)
+#define HAVE_SSL_CTX_SET_ALPN_PROTOS (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined LIBRESSL_VERSION_NUMBER)
#endif
#ifndef HAVE_SSL_CTX_SET_ALPN_SELECT_CB
@@ -1358,6 +1358,11 @@ 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() */