Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit cf654dfa07b63bffb93cc25fedadb920fcb8fdea 1 parent 2be8c52
@bnoordhuis authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/node_crypto.cc
View
11 src/node_crypto.cc
@@ -3638,9 +3638,14 @@ 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 !defined(OPENSSL_NO_COMP)
+ STACK_OF(SSL_COMP)* comp_methods =
+#if OPENSSL_VERSION_NUMBER < 0x00908000L
+ SSL_COMP_get_compression_method()
+#else
+ SSL_COMP_get_compression_methods()
+#endif
+ ;
sk_SSL_COMP_zero(comp_methods);
assert(sk_SSL_COMP_num(comp_methods) == 0);
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.