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