summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2017-01-17 12:04:40 -0800
committerShigeki Ohtsu <ohtsu@ohtsu.org>2017-01-23 15:17:07 +0900
commita57e2f2138c37e636e1f7684ab07cb36eea79716 (patch)
tree93c0a5cbffcac2d2d97a2368c54b34675ccf8489 /src
parent6b6123cfbe90141464bb86400a5f26c835c50f37 (diff)
downloadandroid-node-v8-a57e2f2138c37e636e1f7684ab07cb36eea79716.tar.gz
android-node-v8-a57e2f2138c37e636e1f7684ab07cb36eea79716.tar.bz2
android-node-v8-a57e2f2138c37e636e1f7684ab07cb36eea79716.zip
crypto: freelist_max_len is gone in OpenSSL 1.1.0
The freelist_max_len member of SSL* (and the freelist itself) has been removed in OpenSSL 1.1.0. Thus this change will be necessary at some point but, for now, it makes it a little easier to build with 1.1.0 without breaking anything for previous versions of OpenSSL. PR-URL: https://github.com/nodejs/node/pull/10859 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Diffstat (limited to 'src')
-rw-r--r--src/node_crypto.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index f843667237..ea3ec00ca2 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -1147,10 +1147,14 @@ void SecureContext::SetTicketKeys(const FunctionCallbackInfo<Value>& args) {
void SecureContext::SetFreeListLength(const FunctionCallbackInfo<Value>& args) {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(OPENSSL_IS_BORINGSSL)
+ // |freelist_max_len| was removed in OpenSSL 1.1.0. In that version OpenSSL
+ // mallocs and frees buffers directly, without the use of a freelist.
SecureContext* wrap;
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
wrap->ctx_->freelist_max_len = args[0]->Int32Value();
+#endif
}