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.
This commit is contained in:
parent
0599cb7afa
commit
6f0740e67b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user