mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
This reverts commit da516920fc.
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>
22 lines
639 B
JavaScript
22 lines
639 B
JavaScript
'use strict';
|
|
|
|
// This tests that the crypto error stack can be correctly converted.
|
|
const common = require('../common');
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
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) &&
|
|
err.opensslErrorStack.length > 0;
|
|
});
|