From c50d97c9e6d401e9f131322ea5709cf0428857c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sat, 20 Dec 2025 00:18:14 +0100 Subject: [PATCH] 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. --- src/crypto/crypto_cipher.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/crypto/crypto_cipher.cc b/src/crypto/crypto_cipher.cc index f61ef772e30a95..e96604f267bb62 100644 --- a/src/crypto/crypto_cipher.cc +++ b/src/crypto/crypto_cipher.cc @@ -549,7 +549,6 @@ void CipherBase::SetAuthTag(const FunctionCallbackInfo& 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; }