You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
573 B

--- 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;
}