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
Prev Previous commit
Next Next commit
fixup! crypto: avoid hang when no algorithm available
  • Loading branch information
richardlau committed Jan 17, 2023
commit a954614636fc0df45385bfb8d6a0dbf28c646499
4 changes: 2 additions & 2 deletions test/parallel/test-crypto-no-algorithm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ if (!common.hasOpenSSL3)
const assert = require('node:assert/strict');
const crypto = require('node:crypto');

{
if (common.isMainThread) {
// TODO(richardlau): Decide if `crypto.setFips` should error if the
// provider namd "fips" is not available.
Comment thread
richardlau marked this conversation as resolved.
Outdated
crypto.setFips(1);
crypto.randomBytes(20, common.mustCall((err, _) => {
crypto.randomBytes(20, common.mustCall((err) => {
// crypto.randomBytes should either succeed or fail but not hang.
if (err) {
assert.match(err.message, /digital envelope routines::unsupported/);
Expand Down