mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
src: remove redundant CHECK
The function `SetAuthTag()` returns early (before reaching this line) if `!cipher->IsAuthenticatedMode()`, which expands to the exact same condition that is being `CHECK()`ed here. PR-URL: https://github.com/nodejs/node/pull/61130 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
This commit is contained in:
@@ -549,7 +549,6 @@ void CipherBase::SetAuthTag(const FunctionCallbackInfo<Value>& args) {
|
||||
} else {
|
||||
// At this point, the tag length is already known and must match the
|
||||
// length of the given authentication tag.
|
||||
CHECK(Cipher::FromCtx(cipher->ctx_).isSupportedAuthenticatedMode());
|
||||
CHECK_NE(cipher->auth_tag_len_, kNoAuthTagLength);
|
||||
is_valid = cipher->auth_tag_len_ == tag_len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user