Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2022-03-20 15:18:52 +0300
committerGitHub <noreply@github.com>2022-03-20 15:18:52 +0300
commitcc94563c141ba422d3dd15b4feb550f55aad19a1 (patch)
tree267b680aead0e761f4adbb6d595d122a0edb0de2 /src
parent7fdb9d553432faa89debdef603e814b9cd618eea (diff)
crypto: fix auth tag length error when mode != GCM
PR-URL: https://github.com/nodejs/node/pull/42383 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/crypto/crypto_cipher.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crypto/crypto_cipher.cc b/src/crypto/crypto_cipher.cc
index 90a0c4d1fd0..d6c6f0c4375 100644
--- a/src/crypto/crypto_cipher.cc
+++ b/src/crypto/crypto_cipher.cc
@@ -593,7 +593,8 @@ bool CipherBase::InitAuthenticated(
// Tell OpenSSL about the desired length.
if (!EVP_CIPHER_CTX_ctrl(ctx_.get(), EVP_CTRL_AEAD_SET_TAG, auth_tag_len,
nullptr)) {
- THROW_ERR_CRYPTO_INVALID_AUTH_TAG(env());
+ THROW_ERR_CRYPTO_INVALID_AUTH_TAG(
+ env(), "Invalid authentication tag length: %u", auth_tag_len);
return false;
}