summaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-authenticated.js
diff options
context:
space:
mode:
authorchux0519 <chuxdesign@hotmail.com>2018-11-04 00:04:57 -0400
committerRefael Ackermann <refack@gmail.com>2018-11-07 18:43:41 -0500
commit5c596222433166a7c0274251cca1e55f3bf9560f (patch)
tree0e72a784980822ccace4ab529b9f012c930437c4 /test/parallel/test-crypto-authenticated.js
parent12c0fd4c9a0946dc821029738b80fd1998064125 (diff)
downloadnode-new-5c596222433166a7c0274251cca1e55f3bf9560f.tar.gz
crypto: add support for chacha20-poly1305 for AEAD
openSSL supports AEAD_CHACHA20_POLY1305(rfc7539) since 1.1. PR-URL: https://github.com/nodejs/node/pull/24081 Fixes: https://github.com/nodejs/node/issues/24080 Refs: https://tools.ietf.org/html/rfc7539 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'test/parallel/test-crypto-authenticated.js')
-rw-r--r--test/parallel/test-crypto-authenticated.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js
index ec5c05cb12..01ce1d9996 100644
--- a/test/parallel/test-crypto-authenticated.js
+++ b/test/parallel/test-crypto-authenticated.js
@@ -94,9 +94,10 @@ for (const test of TEST_CASES) {
const isCCM = /^aes-(128|192|256)-ccm$/.test(test.algo);
const isOCB = /^aes-(128|192|256)-ocb$/.test(test.algo);
+ const isChacha20Poly1305 = test.algo === 'chacha20-poly1305';
let options;
- if (isCCM || isOCB)
+ if (isCCM || isOCB || isChacha20Poly1305)
options = { authTagLength: test.tag.length / 2 };
const inputEncoding = test.plainIsHex ? 'hex' : 'ascii';