Skip to content

Commit d7e4108

Browse files
authored
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: #61130 Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Filip Skokan <[email protected]>
1 parent b8db64c commit d7e4108

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/crypto/crypto_cipher.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ void CipherBase::SetAuthTag(const FunctionCallbackInfo<Value>& args) {
549549
} else {
550550
// At this point, the tag length is already known and must match the
551551
// length of the given authentication tag.
552-
CHECK(Cipher::FromCtx(cipher->ctx_).isSupportedAuthenticatedMode());
553552
CHECK_NE(cipher->auth_tag_len_, kNoAuthTagLength);
554553
is_valid = cipher->auth_tag_len_ == tag_len;
555554
}

0 commit comments

Comments
 (0)