mirror of https://github.com/nodejs/node.git
Disable compression with OpenSSL.
This improves memory and speed. Users may apply compression in "userland" above the CryptoStream layer if they desire.pull/22966/head
parent
4877279efa
commit
362785f704
|
@ -2904,9 +2904,6 @@ class Verify : public ObjectWrap {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void InitCrypto(Handle<Object> target) {
|
void InitCrypto(Handle<Object> target) {
|
||||||
HandleScope scope;
|
HandleScope scope;
|
||||||
|
|
||||||
|
@ -2916,6 +2913,18 @@ void InitCrypto(Handle<Object> target) {
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
|
// Turn off compression. Saves memory - do it in userland.
|
||||||
|
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);
|
||||||
|
|
||||||
SecureContext::Initialize(target);
|
SecureContext::Initialize(target);
|
||||||
Connection::Initialize(target);
|
Connection::Initialize(target);
|
||||||
Cipher::Initialize(target);
|
Cipher::Initialize(target);
|
||||||
|
|
Loading…
Reference in New Issue