Skip to content

Commit 0be25bb

Browse files
committed
test: add regression test for counter mode warning
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
1 parent 16c08c5 commit 0be25bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/parallel/test-crypto-cipher-decipher.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,7 @@ testCipher2(Buffer.from('0123456789abcdef'));
148148
assert.strictEqual(decipher.setAuthTag(tagbuf), decipher);
149149
assert.strictEqual(decipher.setAAD(aadbuf), decipher);
150150
}
151+
152+
// https://github.com/nodejs/node/issues/13801
153+
common.expectWarning('Warning', 'Use Cipheriv for counter mode of aes-256-gcm');
154+
crypto.createCipher('aes-256-gcm', '0123456789');

0 commit comments

Comments
 (0)