From 1d7a46a58884de2cb566e4ae54e39b4895355527 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 3 Jun 2011 14:38:55 +0200 Subject: [PATCH] Disabling SSL compression is dependent on OpenSSL version 0.9.8 Fixes #1087. --- src/node_crypto.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index c0bdea6f24e..81fb95e1baa 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -2948,16 +2948,12 @@ void InitCrypto(Handle target) { ERR_load_crypto_strings(); // Turn off compression. Saves memory - do it in userland. +#ifdef SSL_COMP_get_compression_methods + // Before OpenSSL 0.9.8 this was not possible. STACK_OF(SSL_COMP)* comp_methods = SSL_COMP_get_compression_methods(); -#if 0 - if (comp_methods && sk_SSL_COMP_num(comp_methods) > 0) { - default_compression_method = sk_SSL_COMP_pop(comp_methods); - fprintf(stderr, "SSL_COMP_get_name %s\n", - SSL_COMP_get_name(default_compression_method->method)); - } -#endif sk_SSL_COMP_zero(comp_methods); assert(sk_SSL_COMP_num(comp_methods) == 0); +#endif SecureContext::Initialize(target); Connection::Initialize(target);