Skip to content

Commit aafbabc

Browse files
committed
Revert "crypto,https,tls: runtime-deprecate OpenSSL engine-based APIs (DEP0183)"
This reverts commit da51692. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex
1 parent c6c2476 commit aafbabc

12 files changed

Lines changed: 5 additions & 95 deletions

File tree

‎doc/api/crypto.md‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6578,24 +6578,18 @@ added: v15.6.0
65786578
<!-- YAML
65796579
added: v0.11.11
65806580
changes:
6581-
- version: REPLACEME
6582-
pr-url: https://github.com/nodejs/node/pull/63966
6583-
description: Runtime deprecation.
65846581
- version:
65856582
- v22.4.0
65866583
- v20.16.0
65876584
pr-url: https://github.com/nodejs/node/pull/53329
65886585
description: Custom engine support in OpenSSL 3 is deprecated.
65896586
-->
65906587

6591-
> Stability: 0 - Deprecated
6592-
65936588
* `engine` {string}
65946589
* `flags` {crypto.constants} **Default:** `crypto.constants.ENGINE_METHOD_ALL`
65956590

65966591
Load and set the `engine` for some or all OpenSSL functions (selected by flags).
6597-
Use of this API is deprecated because custom engine support has been deprecated
6598-
since OpenSSL 3.
6592+
Support for custom engines in OpenSSL is deprecated from OpenSSL 3.
65996593

66006594
`engine` could be either an id or a path to the engine's shared library.
66016595

‎doc/api/deprecations.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4111,17 +4111,14 @@ that are shorter than the default authentication tag length (i.e., shorter than
41114111

41124112
<!-- YAML
41134113
changes:
4114-
- version: REPLACEME
4115-
pr-url: https://github.com/nodejs/node/pull/63966
4116-
description: Runtime deprecation.
41174114
- version:
41184115
- v22.4.0
41194116
- v20.16.0
41204117
pr-url: https://github.com/nodejs/node/pull/53329
41214118
description: Documentation-only deprecation.
41224119
-->
41234120

4124-
Type: Runtime
4121+
Type: Documentation-only
41254122

41264123
OpenSSL 3 has deprecated support for custom engines with a recommendation to
41274124
switch to its new provider model. The `clientCertEngine` option for

‎doc/api/https.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,6 @@ a `timeout` of 5 seconds.
427427
<!-- YAML
428428
added: v0.3.6
429429
changes:
430-
- version: REPLACEME
431-
pr-url: https://github.com/nodejs/node/pull/63966
432-
description: The `clientCertEngine` option is runtime deprecated.
433430
- version:
434431
- v22.4.0
435432
- v20.16.0

‎doc/api/tls.md‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,10 +1965,6 @@ argument.
19651965
<!-- YAML
19661966
added: v0.11.13
19671967
changes:
1968-
- version: REPLACEME
1969-
pr-url: https://github.com/nodejs/node/pull/63966
1970-
description: The `clientCertEngine`, `privateKeyEngine` and
1971-
`privateKeyIdentifier` options are runtime deprecated.
19721968
- version:
19731969
- v26.4.0
19741970
- v24.19.0
@@ -2193,9 +2189,6 @@ permissible, use 2048 bits or larger for stronger security.
21932189
<!-- YAML
21942190
added: v0.3.2
21952191
changes:
2196-
- version: REPLACEME
2197-
pr-url: https://github.com/nodejs/node/pull/63966
2198-
description: The `clientCertEngine` option is runtime deprecated.
21992192
- version:
22002193
- v22.4.0
22012194
- v20.16.0

‎lib/internal/crypto/util.js‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const {
8383
cachedResult,
8484
emitExperimentalWarning,
8585
filterDuplicateStrings,
86-
getDeprecationWarningEmitter,
8786
lazyDOMException,
8887
setOwnProperty,
8988
} = require('internal/util');
@@ -195,11 +194,6 @@ const getMacs = cachedArrayByFipsGeneration(
195194

196195
const getCurves = cachedResult(() => filterDuplicateStrings(_getCurves()));
197196

198-
const emitOpenSSLEngineDeprecation = getDeprecationWarningEmitter(
199-
'DEP0183',
200-
'OpenSSL engine-based APIs are deprecated.',
201-
);
202-
203197
function setEngine(id, flags) {
204198
validateString(id, 'id');
205199
if (flags)
@@ -210,8 +204,6 @@ function setEngine(id, flags) {
210204
if (flags === 0)
211205
flags = ENGINE_METHOD_ALL;
212206

213-
emitOpenSSLEngineDeprecation();
214-
215207
if (typeof _setEngine !== 'function')
216208
throw new ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED();
217209
if (!_setEngine(id, flags))
@@ -1191,7 +1183,6 @@ module.exports = {
11911183
getHashes,
11921184
getMacs,
11931185
getOptionalByteLength,
1194-
emitOpenSSLEngineDeprecation,
11951186
kHandle,
11961187
setEngine,
11971188
toBuf,

‎lib/internal/tls/secure-context.js‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const {
3434
} = require('internal/validators');
3535

3636
const {
37-
emitOpenSSLEngineDeprecation,
3837
toBuf,
3938
} = require('internal/crypto/util');
4039

@@ -270,7 +269,6 @@ function configSecureContext(context, options = kEmptyObject, name = 'options')
270269

271270
if (typeof privateKeyIdentifier === 'string' &&
272271
typeof privateKeyEngine === 'string') {
273-
emitOpenSSLEngineDeprecation();
274272
if (context.setEngineKey)
275273
context.setEngineKey(privateKeyIdentifier, privateKeyEngine);
276274
else
@@ -332,7 +330,6 @@ function configSecureContext(context, options = kEmptyObject, name = 'options')
332330
}
333331

334332
if (typeof clientCertEngine === 'string') {
335-
emitOpenSSLEngineDeprecation();
336333
if (typeof context.setClientCertEngine !== 'function')
337334
throw new ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED();
338335
else

‎test/addons/openssl-client-cert-engine/test.js‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ const agentKey = fs.readFileSync(fixture.path('/keys/agent1-key.pem'));
2121
const agentCert = fs.readFileSync(fixture.path('/keys/agent1-cert.pem'));
2222
const agentCa = fs.readFileSync(fixture.path('/keys/ca1-cert.pem'));
2323

24-
common.expectWarning({
25-
DeprecationWarning: {
26-
DEP0183: 'OpenSSL engine-based APIs are deprecated.',
27-
},
28-
});
29-
3024
const serverOptions = {
3125
key: agentKey,
3226
cert: agentCert,

‎test/addons/openssl-key-engine/test.js‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ const agentKey = fs.readFileSync(fixture.path('/keys/agent1-key.pem'));
2121
const agentCert = fs.readFileSync(fixture.path('/keys/agent1-cert.pem'));
2222
const agentCa = fs.readFileSync(fixture.path('/keys/ca1-cert.pem'));
2323

24-
common.expectWarning({
25-
DeprecationWarning: {
26-
DEP0183: 'OpenSSL engine-based APIs are deprecated.',
27-
},
28-
});
29-
3024
const serverOptions = {
3125
key: agentKey,
3226
cert: agentCert,

‎test/parallel/test-crypto-dep0183.js‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎test/parallel/test-tls-clientcertengine-unsupported.js‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ if (!common.hasCrypto)
66
common.skip('missing crypto');
77

88
const assert = require('assert');
9-
10-
common.expectWarning({
11-
'internal/test/binding':
12-
'These APIs are for internal testing only. Do not use them.',
13-
'DeprecationWarning': {
14-
DEP0183: 'OpenSSL engine-based APIs are deprecated.',
15-
},
16-
});
17-
189
// Monkey-patch SecureContext
1910
const { internalBinding } = require('internal/test/binding');
2011
const binding = internalBinding('crypto');

0 commit comments

Comments
 (0)