Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: components/gcm_driver/crypto/gcm_encryption_provider.cc

Issue 2713673002: Separate out the scheme from the GCMMessageCryptographer (Closed)
Patch Set: comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/gcm_driver/crypto/gcm_encryption_provider.cc
diff --git a/components/gcm_driver/crypto/gcm_encryption_provider.cc b/components/gcm_driver/crypto/gcm_encryption_provider.cc
index fa46cbae72e2111b6302e66f7a7a544efd7e2b1d..c9c7183ebe6757f330e4a032ef45508eb76b0323 100644
--- a/components/gcm_driver/crypto/gcm_encryption_provider.cc
+++ b/components/gcm_driver/crypto/gcm_encryption_provider.cc
@@ -247,9 +247,11 @@ void GCMEncryptionProvider::DecryptMessageWithKey(
std::string plaintext;
- GCMMessageCryptographer cryptographer(pair.public_key(), dh, auth_secret);
- if (!cryptographer.Decrypt(message.raw_data, shared_secret, salt, rs,
- &plaintext)) {
+ GCMMessageCryptographer cryptographer(
+ GCMMessageCryptographer::Version::DRAFT_03);
+
+ if (!cryptographer.Decrypt(pair.public_key(), dh, shared_secret, auth_secret,
+ salt, message.raw_data, rs, &plaintext)) {
DLOG(ERROR) << "Unable to decrypt the incoming data.";
callback.Run(DECRYPTION_RESULT_INVALID_PAYLOAD, IncomingMessage());
return;

Powered by Google App Engine
This is Rietveld 408576698