mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
crypto,https,tls: end OpenSSL engine support
OpenSSL removed support for engines in version 4. Remove the Node.js APIs, constants, native bindings, and implementation that depend on ENGINE. Keep recognizing the former TLS and HTTPS engine options so their use fails explicitly instead of appearing to work while being ignored. Move DEP0183 directly from Documentation-only to End-of-Life after reverting its unreleased Runtime deprecation. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: https://github.com/nodejs/node/pull/64777 Fixes: https://github.com/nodejs/node/issues/56733 Refs: https://github.com/nodejs/node/pull/64211 Refs: https://github.com/nodejs/node/pull/63966 Refs: https://github.com/nodejs/node/pull/53329 Refs: https://github.com/nodejs/node/pull/48950 Refs: https://github.com/nodejs/node/issues/45465 Refs: https://github.com/nodejs/node/issues/42827 Refs: https://github.com/nodejs/node/issues/47076 Refs: https://github.com/nodejs/node/pull/62862 Refs: https://github.com/nodejs/node/pull/38512 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
This commit is contained in:
41 files changed
+174
-1290
No files matched your search
+6
-12
@@ -49,6 +49,9 @@ const { ERR_PROXY_TUNNEL } = require('internal/errors').codes;
|
||||
assertCrypto();
|
||||
|
||||
const tls = require('tls');
|
||||
const {
|
||||
validateOpenSSLEngineOptions,
|
||||
} = require('internal/tls/secure-context');
|
||||
const kPerRequestCheckServerIdentity = Symbol('per-request checkServerIdentity');
|
||||
let perRequestCheckServerIdentityIndex = 0;
|
||||
const {
|
||||
@@ -487,6 +490,7 @@ function Agent(options) {
|
||||
return new Agent(options);
|
||||
|
||||
options = { __proto__: null, ...options };
|
||||
validateOpenSSLEngineOptions(options);
|
||||
options.defaultPort ??= 443;
|
||||
options.protocol ??= 'https:';
|
||||
FunctionPrototypeCall(HttpAgent, this, options);
|
||||
@@ -535,6 +539,7 @@ function getPfxAgentKey(pfx, passphrase) {
|
||||
* @returns {string}
|
||||
*/
|
||||
Agent.prototype.getName = function getName(options = kEmptyObject) {
|
||||
validateOpenSSLEngineOptions(options);
|
||||
let name = FunctionPrototypeCall(HttpAgent.prototype.getName, this, options);
|
||||
|
||||
name += ':';
|
||||
@@ -545,10 +550,6 @@ Agent.prototype.getName = function getName(options = kEmptyObject) {
|
||||
if (options.cert)
|
||||
name += options.cert;
|
||||
|
||||
name += ':';
|
||||
if (options.clientCertEngine)
|
||||
name += options.clientCertEngine;
|
||||
|
||||
name += ':';
|
||||
if (options.ciphers)
|
||||
name += options.ciphers;
|
||||
@@ -609,14 +610,6 @@ Agent.prototype.getName = function getName(options = kEmptyObject) {
|
||||
if (options.sigalgs)
|
||||
name += JSONStringify(options.sigalgs);
|
||||
|
||||
name += ':';
|
||||
if (options.privateKeyIdentifier)
|
||||
name += options.privateKeyIdentifier;
|
||||
|
||||
name += ':';
|
||||
if (options.privateKeyEngine)
|
||||
name += options.privateKeyEngine;
|
||||
|
||||
if (options[kPerRequestCheckServerIdentity])
|
||||
name += `:${options[kPerRequestCheckServerIdentity]}`;
|
||||
|
||||
@@ -692,6 +685,7 @@ function request(...args) {
|
||||
if (args[0] && typeof args[0] !== 'function') {
|
||||
ObjectAssign(options, ArrayPrototypeShift(args));
|
||||
}
|
||||
validateOpenSSLEngineOptions(options);
|
||||
|
||||
if (options.checkServerIdentity !== undefined &&
|
||||
options.checkServerIdentity !== tls.checkServerIdentity &&
|
||||
|
||||
Reference in new issue
Block a user