Skip to content

Commit da8baf4

Browse files
richardlaudanielleadams
authored andcommitted
test: do not load absolute path crypto engines twice
Newer versions of OpenSSL now throws an error if an engine is loaded twice by its absolute path (a second load by its id appears to be okay). PR-URL: #41177 Refs: quictls/openssl#69 Refs: https://mta.openssl.org/pipermail/openssl-announce/2021-December/000212.html Reviewed-By: Danielle Adams <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Derek Lewis <[email protected]>
1 parent 8fcb71a commit da8baf4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/parallel/test-crypto-engine.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ crypto.setEngine('dynamic', crypto.constants.ENGINE_METHOD_RSA);
4444
fs.accessSync(enginePath);
4545

4646
crypto.setEngine(enginePath);
47-
crypto.setEngine(enginePath);
47+
// OpenSSL 3.0.1 and 1.1.1m now throw errors if an engine is loaded again
48+
// with a duplicate absolute path.
49+
// TODO(richardlau): figure out why this fails on macOS but not Linux.
50+
// crypto.setEngine(enginePath);
4851

49-
crypto.setEngine(enginePath, crypto.constants.ENGINE_METHOD_RSA);
50-
crypto.setEngine(enginePath, crypto.constants.ENGINE_METHOD_RSA);
52+
// crypto.setEngine(enginePath, crypto.constants.ENGINE_METHOD_RSA);
53+
// crypto.setEngine(enginePath, crypto.constants.ENGINE_METHOD_RSA);
5154

5255
process.env.OPENSSL_ENGINES = execDir;
5356

0 commit comments

Comments
 (0)