Files
brave-core/patches/components-os_crypt-sync-os_crypt_win.cc.patch
T

21 lines
1.1 KiB
Diff

diff --git a/components/os_crypt/sync/os_crypt_win.cc b/components/os_crypt/sync/os_crypt_win.cc
index 6cb720a5e1fc560ff18b800470e610ff92e47a05..9b2a0bda54324521e9d0069be74f017c1e77120d 100644
--- a/components/os_crypt/sync/os_crypt_win.cc
+++ b/components/os_crypt/sync/os_crypt_win.cc
@@ -195,6 +195,7 @@ bool OSCryptImpl::DecryptString16(const std::string& ciphertext,
bool OSCryptImpl::EncryptString(const std::string& plaintext,
std::string* ciphertext) {
+ if (IsEncryptionDisabled(plaintext, ciphertext)) { return true; }
if (use_legacy_)
return EncryptStringWithDPAPI(plaintext, ciphertext);
@@ -220,6 +221,7 @@ bool OSCryptImpl::EncryptString(const std::string& plaintext,
bool OSCryptImpl::DecryptString(const std::string& ciphertext,
std::string* plaintext) {
+ if (IsEncryptionDisabled(ciphertext, plaintext)) { return true; }
if (!base::StartsWith(ciphertext, kEncryptionVersionPrefix,
base::CompareCase::SENSITIVE))
return DecryptStringWithDPAPI(ciphertext, plaintext);