Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions patches/components-os_crypt-os_crypt_win.cc.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
diff --git a/components/os_crypt/os_crypt_win.cc b/components/os_crypt/os_crypt_win.cc
index 792233d4405f115f4fc72423dad10c415f4df66b..1fb45bb390dba292b3a075dad620a3b7e73ccd84 100644
index 8a7f33e76963..ca64e70f4a76 100644
--- a/components/os_crypt/os_crypt_win.cc
+++ b/components/os_crypt/os_crypt_win.cc
@@ -26,6 +26,7 @@ bool OSCrypt::DecryptString16(const std::string& ciphertext,

@@ -134,6 +134,7 @@ bool OSCrypt::DecryptString16(const std::string& ciphertext,
// static
bool OSCrypt::EncryptString(const std::string& plaintext,
std::string* ciphertext) {
+ if (IsEncryptionDisabled(plaintext, ciphertext)) { return true; }
DATA_BLOB input;
input.pbData = const_cast<BYTE*>(
reinterpret_cast<const BYTE*>(plaintext.data()));
@@ -49,6 +50,7 @@ bool OSCrypt::EncryptString(const std::string& plaintext,

if (g_use_legacy)
return EncryptStringWithDPAPI(plaintext, ciphertext);

@@ -160,6 +161,7 @@ bool OSCrypt::EncryptString(const std::string& plaintext,
// static
bool OSCrypt::DecryptString(const std::string& ciphertext,
std::string* plaintext) {
+ if (IsEncryptionDisabled(ciphertext, plaintext)) { return true; }
DATA_BLOB input;
input.pbData = const_cast<BYTE*>(
reinterpret_cast<const BYTE*>(ciphertext.data()));
+ if (IsEncryptionDisabled(plaintext, ciphertext)) { return true; }
if (!base::StartsWith(ciphertext, kEncryptionVersionPrefix,
base::CompareCase::SENSITIVE))
return DecryptStringWithDPAPI(ciphertext, plaintext);