# HG changeset patch # User Paul Aurich # Date 1324146658 28800 # Node ID 5be249c0ae71c00fe967ad1fc38981e24d0f2081 # Parent b3a0d23e5b204f472ca3b84d09d61844ace1807f context: Add no_compression for OpenSSL 0.9.8 as well Since OpenSSL 0.9.8 doesn't have SSL_OP_NO_COMPRESSION, this is implemented by simplying NULLing out the SSL_CTX->comp_methods stack. diff -r b3a0d23e5b20 -r 5be249c0ae71 src/context.c --- a/src/context.c Tue Jul 05 18:12:17 2011 -0700 +++ b/src/context.c Sat Dec 17 10:30:58 2011 -0800 @@ -538,6 +538,14 @@ /* any option? */ if (max > 1) { for (i = 2; i <= max; i++) { +#if !defined(SSL_OP_NO_COMPRESSION) + /* Manually disable compression if built against an older + * OpenSSL which doesn't have SSL_OP_NO_COMPRESSION + */ + if (!strcmp(luaL_checkstring(L, i), "no_compression")) { + ctx->comp_methods = NULL; + } else +#endif if (!set_option_flag(luaL_checkstring(L, i), &flag)) { lua_pushboolean(L, 0); lua_pushstring(L, "invalid option");