MCPcopy Index your code
hub / github.com/nodejs/node / createSecureContext

Function createSecureContext

lib/internal/tls/common.js:97–117  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

95}
96
97function createSecureContext(options) {
98 options ||= kEmptyObject;
99 const {
100 honorCipherOrder,
101 minVersion,
102 maxVersion,
103 secureProtocol,
104 } = options;
105
106 let { secureOptions } = options;
107
108 if (honorCipherOrder)
109 secureOptions |= SSL_OP_CIPHER_SERVER_PREFERENCE;
110
111 const c = new SecureContext(secureProtocol, secureOptions,
112 minVersion, maxVersion);
113
114 configSecureContext(c.context, options);
115
116 return c;
117}
118
119// Translate some fields from the handle's C-friendly format into more idiomatic
120// javascript object representations before passing them back to the user. Can

Callers 1

Calls 1

configSecureContextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…