Browse Source

Merge pull request #3035 from jow-/luasec-no-compression-fix

luasec: fix build with OPENSSL_NO_COMP
lilik-openwrt-22.03
champtar 8 years ago
committed by GitHub
parent
commit
e128a2c3d9
2 changed files with 25 additions and 1 deletions
  1. +1
    -1
      lang/luasec/Makefile
  2. +24
    -0
      lang/luasec/patches/200-compression-method-fix.patch

+ 1
- 1
lang/luasec/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luasec PKG_NAME:=luasec
PKG_VERSION:=0.5.1 PKG_VERSION:=0.5.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/ PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/


+ 24
- 0
lang/luasec/patches/200-compression-method-fix.patch View File

@ -0,0 +1,24 @@
--- a/src/ssl.c
+++ b/src/ssl.c
@@ -401,17 +401,21 @@ static int meth_want(lua_State *L)
*/
static int meth_compression(lua_State *L)
{
+#ifndef OPENSSL_NO_COMP
const COMP_METHOD *comp;
+#endif
p_ssl ssl = (p_ssl)luaL_checkudata(L, 1, "SSL:Connection");
if (ssl->state != LSEC_STATE_CONNECTED) {
lua_pushnil(L);
lua_pushstring(L, "closed");
return 2;
}
+#ifndef OPENSSL_NO_COMP
comp = SSL_get_current_compression(ssl->ssl);
if (comp)
lua_pushstring(L, SSL_COMP_get_name(comp));
else
+#endif
lua_pushnil(L);
return 1;
}

Loading…
Cancel
Save