Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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: #41175
Refs: quictls/openssl#68
Refs: https://mta.openssl.org/pipermail/openssl-announce/2021-December/000212.html
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
richardlau committed Jan 17, 2022
commit 2c84c3eee80b91424a6546bd4e4bad14c4771b5f
9 changes: 6 additions & 3 deletions test/parallel/test-crypto-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ crypto.setEngine('dynamic', crypto.constants.ENGINE_METHOD_RSA);
fs.accessSync(enginePath);

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

crypto.setEngine(enginePath, crypto.constants.ENGINE_METHOD_RSA);
crypto.setEngine(enginePath, crypto.constants.ENGINE_METHOD_RSA);
// crypto.setEngine(enginePath, crypto.constants.ENGINE_METHOD_RSA);
// crypto.setEngine(enginePath, crypto.constants.ENGINE_METHOD_RSA);

process.env.OPENSSL_ENGINES = execDir;

Expand Down