diff options
author | Tobias Nießen <tniessen@tnie.de> | 2022-03-20 15:18:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-20 15:18:52 +0300 |
commit | cc94563c141ba422d3dd15b4feb550f55aad19a1 (patch) | |
tree | 267b680aead0e761f4adbb6d595d122a0edb0de2 /src | |
parent | 7fdb9d553432faa89debdef603e814b9cd618eea (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.cc | 3 |
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; } |