diff options
author | Marcel Raad <raad@teamviewer.com> | 2016-05-30 13:26:20 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-05-30 15:31:14 +0200 |
commit | c9b4e6e85907f1581c8d6e1ab52c7f8b9282f266 (patch) | |
tree | c8089a11d2cc68b011ccbe586ca2c9fb97199f86 | |
parent | 9a1593501cb30e36ea7109680cab368f9425000d (diff) |
openssl: fix build with OPENSSL_NO_COMP
With OPENSSL_NO_COMP defined, there is no function
SSL_COMP_free_compression_methods
Closes #836
-rw-r--r-- | lib/vtls/openssl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 3a4bde5b3..592bea5ff 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -122,6 +122,12 @@ #define HAVE_X509_GET0_SIGNATURE 1 #endif +#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \ + OPENSSL_VERSION_NUMBER <= 0x10002FFFL && \ + !defined(OPENSSL_NO_COMP) +#define HAVE_SSL_COMP_FREE_COMPRESSION_METHODS 1 +#endif + #if (OPENSSL_VERSION_NUMBER < 0x0090808fL) /* not present in older OpenSSL */ #define OPENSSL_load_builtin_modules(x) @@ -748,8 +754,7 @@ void Curl_ossl_cleanup(void) /* Free all memory allocated by all configuration modules */ CONF_modules_free(); -#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \ - OPENSSL_VERSION_NUMBER <= 0x10002FFFL +#ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS SSL_COMP_free_compression_methods(); #endif } |