Skip to content

Commit

Permalink
test: add regression test for counter mode warning
Browse files Browse the repository at this point in the history
The previous commit is a back-port of pull request nodejs#13821 to v6.x.
Its regression test does not apply to the v6.x branch (depends on
semver-major pull request nodejs#9405) so this commit adds a new test.

Refs: nodejs#13821
Refs: nodejs#9405
  • Loading branch information
bnoordhuis committed Oct 29, 2017
1 parent 16c08c5 commit 0be25bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-crypto-cipher-decipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,7 @@ testCipher2(Buffer.from('0123456789abcdef'));
assert.strictEqual(decipher.setAuthTag(tagbuf), decipher);
assert.strictEqual(decipher.setAAD(aadbuf), decipher);
}

// https://github.com/nodejs/node/issues/13801
common.expectWarning('Warning', 'Use Cipheriv for counter mode of aes-256-gcm');
crypto.createCipher('aes-256-gcm', '0123456789');

0 comments on commit 0be25bb

Please sign in to comment.