From 6a9bb91648c2f26586e8f817c6e84832c84b7360 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Wed, 17 Jun 2026 16:48:54 +0200 Subject: [PATCH 1/4] crypto,https,tls: runtime-deprecate OpenSSL engine-based APIs (DEP0183) Signed-off-by: Filip Skokan --- doc/api/crypto.md | 6 ++++- doc/api/deprecations.md | 5 ++++- doc/api/https.md | 3 +++ doc/api/tls.md | 7 ++++++ lib/internal/crypto/util.js | 9 ++++++++ lib/internal/tls/secure-context.js | 3 +++ .../addons/openssl-client-cert-engine/test.js | 6 +++++ test/addons/openssl-key-engine/test.js | 6 +++++ test/parallel/test-crypto-dep0183.js | 22 +++++++++++++++++++ .../test-tls-clientcertengine-unsupported.js | 9 ++++++++ test/parallel/test-tls-error-stack.js | 6 +++++ .../test-tls-keyengine-unsupported.js | 9 ++++++++ 12 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-crypto-dep0183.js diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 00a77f38a6d3b3..57bd2c70f114f1 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -6057,6 +6057,9 @@ added: v15.6.0 -Type: Documentation-only +Type: Runtime OpenSSL 3 has deprecated support for custom engines with a recommendation to switch to its new provider model. The `clientCertEngine` option for diff --git a/doc/api/https.md b/doc/api/https.md index 85e6a77c7ff262..b5f6c3c5d8ce2a 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -423,6 +423,9 @@ a `timeout` of 5 seconds. +> Stability: 0 - Deprecated + * `engine` {string} * `flags` {crypto.constants} **Default:** `crypto.constants.ENGINE_METHOD_ALL` From 640e80379c33c8b1965ae8bc64d568040a73a1d3 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Wed, 17 Jun 2026 17:45:02 +0200 Subject: [PATCH 4/4] fixup! crypto,https,tls: runtime-deprecate OpenSSL engine-based APIs (DEP0183) --- test/parallel/test-tls-error-stack.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-error-stack.js b/test/parallel/test-tls-error-stack.js index baa2851ee8da23..0a952a46bdd473 100644 --- a/test/parallel/test-tls-error-stack.js +++ b/test/parallel/test-tls-error-stack.js @@ -8,6 +8,10 @@ if (!common.hasCrypto) const assert = require('assert'); const tls = require('tls'); +const secureContext = tls.createSecureContext(); +if (typeof secureContext.context.setClientCertEngine !== 'function') + common.skip('OpenSSL dropped engine support'); + common.expectWarning({ DeprecationWarning: { DEP0183: 'OpenSSL engine-based APIs are deprecated.', @@ -17,9 +21,6 @@ common.expectWarning({ assert.throws(() => { tls.createSecureContext({ clientCertEngine: 'x' }); }, (err) => { - if (err.code === 'ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED') - common.skip('OpenSSL dropped engine support'); - return err.name === 'Error' && /could not load the shared library/.test(err.message) && Array.isArray(err.opensslErrorStack) &&