Skip to content

Commit 3a840bf

Browse files
committed
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).
1 parent 119842f commit 3a840bf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/parallel/test-crypto-engine.js

Lines changed: 6 additions & 3 deletions
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)