-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sync] Update Nigori::Encrypt() to indicate it never fails
Encryption success doesn't depend on input (except extreme corner cases when input is way too long - but this would probably cause OOM crash). Keys themselves are either derived in the sane way or imported and verified, so corrupted keys shouldn't be possible. Besides that, there are more generic reasons to fail, like OOM inside BoringSSL. It seems reasonable to crash in such cases and perhaps even safer to do so. This CL updates Encrypt() method to use CHECK() inside and return encrypted output directly (instead of using output parameter with boolean result). Bug: 1368018 Change-Id: I65dba67731ede1c0edd2682245d74768d6cfca4d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4008281 Reviewed-by: Mikel Astiz <mastiz@chromium.org> Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com> Cr-Commit-Position: refs/heads/main@{#1069066}
- Loading branch information
Maksim Moskvitin
authored and
Chromium LUCI CQ
committed
Nov 9, 2022
1 parent
205a0d1
commit 963a081
Showing
6 changed files
with
29 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters