Browse Source

crypto: check for SSL_COMP_get_compression_methods()

Function was named SSL_COMP_get_compression_method() (singular)
in OpenSSL 0.9.7 and older.

Fixes #1242.
v0.7.4-release
Ben Noordhuis 14 years ago
parent
commit
6f0740e67b
  1. 11
      src/node_crypto.cc

11
src/node_crypto.cc

@ -3638,9 +3638,14 @@ void InitCrypto(Handle<Object> target) {
ERR_load_crypto_strings(); ERR_load_crypto_strings();
// Turn off compression. Saves memory - do it in userland. // Turn off compression. Saves memory - do it in userland.
#ifdef SSL_COMP_get_compression_methods #if !defined(OPENSSL_NO_COMP)
// Before OpenSSL 0.9.8 this was not possible. STACK_OF(SSL_COMP)* comp_methods =
STACK_OF(SSL_COMP)* comp_methods = SSL_COMP_get_compression_methods(); #if OPENSSL_VERSION_NUMBER < 0x00908000L
SSL_COMP_get_compression_method()
#else
SSL_COMP_get_compression_methods()
#endif
;
sk_SSL_COMP_zero(comp_methods); sk_SSL_COMP_zero(comp_methods);
assert(sk_SSL_COMP_num(comp_methods) == 0); assert(sk_SSL_COMP_num(comp_methods) == 0);
#endif #endif

Loading…
Cancel
Save