From bdd28561522b7740d332fbc6bf2899fd2d2124af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Fri, 13 Apr 2018 18:02:46 +0200 Subject: [PATCH] crypto: allow to restrict valid GCM tag length This change allows users to restrict accepted GCM authentication tag lengths to a single value. Backport-PR-URL: https://github.com/nodejs/node/pull/20706 PR-URL: https://github.com/nodejs/node/pull/20039 Fixes: https://github.com/nodejs/node/issues/17523 Reviewed-By: James M Snell Reviewed-By: Yihong Wang Reviewed-By: Ben Noordhuis --- doc/api/crypto.md | 8 ++++- src/node_crypto.cc | 38 +++++++++++++++++--- src/node_crypto.h | 3 +- test/parallel/test-crypto-authenticated.js | 40 ++++++++++++++++++++++ 4 files changed, 82 insertions(+), 7 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index b98693466a8efd..173e9d55583e49 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1454,6 +1454,10 @@ to create the `Decipher` object.