src/context.c

changeset 45
5be249c0ae71
parent 43
708d39695790
equal deleted inserted replaced
44:b3a0d23e5b20 45:5be249c0ae71
536 SSL_CTX *ctx = ctx_getcontext(L, 1); 536 SSL_CTX *ctx = ctx_getcontext(L, 1);
537 int max = lua_gettop(L); 537 int max = lua_gettop(L);
538 /* any option? */ 538 /* any option? */
539 if (max > 1) { 539 if (max > 1) {
540 for (i = 2; i <= max; i++) { 540 for (i = 2; i <= max; i++) {
541 #if !defined(SSL_OP_NO_COMPRESSION)
542 /* Manually disable compression if built against an older
543 * OpenSSL which doesn't have SSL_OP_NO_COMPRESSION
544 */
545 if (!strcmp(luaL_checkstring(L, i), "no_compression")) {
546 ctx->comp_methods = NULL;
547 } else
548 #endif
541 if (!set_option_flag(luaL_checkstring(L, i), &flag)) { 549 if (!set_option_flag(luaL_checkstring(L, i), &flag)) {
542 lua_pushboolean(L, 0); 550 lua_pushboolean(L, 0);
543 lua_pushstring(L, "invalid option"); 551 lua_pushstring(L, "invalid option");
544 return 2; 552 return 2;
545 } 553 }

mercurial