Hi,
here's a fix for luasec, broken since the ssl compression removal at
g2k14. This should behave correctly with both libressl and openssl (git
blame says that SSL_get_current_compression returns NULL if
OPENSSL_NO_COMP is defined). YMMV.
Comments / ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/security/luasec/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile 14 Apr 2014 01:20:10 -0000 1.14
+++ Makefile 14 Jul 2014 21:03:15 -0000
@@ -4,7 +4,7 @@ SHARED_ONLY= Yes
COMMENT= lua binding to OpenSSL to provide TLS/SSL communication
VERSION= 0.5
-REVISION= 0
+REVISION= 1
DISTNAME= luasec-${VERSION}
CATEGORIES= security
MASTER_SITES= https://github.com/brunoos/luasec/archive/
Index: patches/patch-src_ssl_c
===================================================================
RCS file: patches/patch-src_ssl_c
diff -N patches/patch-src_ssl_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_ssl_c 14 Jul 2014 21:01:32 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+--- src/ssl.c.orig Mon Jul 14 22:58:19 2014
++++ src/ssl.c Mon Jul 14 23:01:06 2014
+@@ -401,7 +401,11 @@ static int meth_want(lua_State *L)
+ */
+ static int meth_compression(lua_State *L)
+ {
++#ifdef OPENSSL_NO_COMP
++ const void *comp;
++#else
+ 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);
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE