| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7bceb4f commit 9c53e40
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -135,7 +135,9 @@ exports.createSecureContext = function createSecureContext(options, context) { | |||
| 135 | 135 | } | |
| 136 | 136 | } | |
| 137 | 137 | ||
| 138 | - // Do not keep read/write buffers in free list | ||
| 138 | + // Do not keep read/write buffers in free list for OpenSSL < 1.1.0. (For | ||
| 139 | + // OpenSSL 1.1.0, buffers are malloced and freed without the use of a | ||
| 140 | + // freelist.) | ||
| 139 | 141 | if (options.singleUse) { | |
| 140 | 142 | c.singleUse = true; | |
| 141 | 143 | c.context.setFreeListLength(0); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1149,10 +1149,14 @@ void SecureContext::SetTicketKeys(const FunctionCallbackInfo<Value>& args) { | |||
| 1149 | 1149 | ||
| 1150 | 1150 | ||
| 1151 | 1151 | void SecureContext::SetFreeListLength(const FunctionCallbackInfo<Value>& args) { | |
| 1152 | + #if OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(OPENSSL_IS_BORINGSSL) | ||
| 1153 | + // |freelist_max_len| was removed in OpenSSL 1.1.0. In that version OpenSSL | ||
| 1154 | + // mallocs and frees buffers directly, without the use of a freelist. | ||
| 1152 | 1155 | SecureContext* wrap; | |
| 1153 | 1156 | ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); | |
| 1154 | 1157 | ||
| 1155 | 1158 | wrap->ctx_->freelist_max_len = args[0]->Int32Value(); | |
| 1159 | + #endif | ||
| 1156 | 1160 | } | |
| 1157 | 1161 | ||
| 1158 | 1162 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments