Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Disabling SSL compression is dependent on OpenSSL version 0.9.8
Browse files Browse the repository at this point in the history
Fixes #1087.
  • Loading branch information
ry committed Jun 3, 2011
1 parent 4956e3c commit 1d7a46a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2948,16 +2948,12 @@ void InitCrypto(Handle<Object> 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);
Expand Down

0 comments on commit 1d7a46a

Please sign in to comment.