GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: destroy singleUse context immediately · nodejs/node@b72e4bc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _tls_common.js
    • _tls_wrap.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_tls_common.js‎

Copy file name to clipboardExpand all lines: lib/_tls_common.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ exports.createSecureContext = function createSecureContext(options, context) {
134134
}
135135

136136
// Do not keep read/write buffers in free list
137-
if (options.singleUse)
137+
if (options.singleUse) {
138+
c.singleUse = true;
138139
c.context.setFreeListLength(0);
140+
}
139141

140142
return c;
141143
};
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ TLSSocket.prototype._wrapHandle = function(handle) {
301301
};
302302

303303
TLSSocket.prototype._destroySSL = function _destroySSL() {
304-
return this.ssl.destroySSL();
304+
this.ssl.destroySSL();
305+
if (this.ssl._secureContext.singleUse)
306+
this.ssl._secureContext.context.close();
305307
};
306308

307309
TLSSocket.prototype._init = function(socket, wrap) {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.