test: do not skip OCB decryption in FIPS mode · nodejs/node@d05263e

Original file line numberDiff line numberDiff line change

@@ -304,7 +304,7 @@ for (const test of TEST_CASES) {

304304

}

305305
306306

// Test that create(De|C)ipheriv throws if the mode is CCM or OCB and no

307-

// authentication tag has been specified.

307+

// authentication tag length has been specified.

308308

{

309309

for (const mode of ['ccm', 'ocb']) {

310310

assert.throws(() => {

@@ -316,7 +316,7 @@ for (const test of TEST_CASES) {

316316

});

317317
318318

// CCM decryption is unsupported in FIPS mode.

319-

if (!isFipsEnabled) {

319+

if (!isFipsEnabled || mode !== 'ccm') {

320320

assert.throws(() => {

321321

crypto.createDecipheriv(`aes-256-${mode}`,

322322

'FxLKsqdmv0E9xrQhp0b1ZgI0K7JFZJM8',