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 35015369f5d25a0746e0783489422bf78a21ced6..e9ca7855cdd97525aac91edbd2377e6114e25d21 100644 |
--- a/components/gcm_driver/crypto/gcm_encryption_provider.cc |
+++ b/components/gcm_driver/crypto/gcm_encryption_provider.cc |
@@ -150,6 +150,11 @@ void GCMEncryptionProvider::DecryptMessage( |
return; |
} |
+ // Ignore values that don't include the "dh" property. When using VAPID, it is |
+ // valid for the application server to supply multiple values. |
+ while (crypto_key_header_iterator.dh().empty() && |
johnme
2016/06/30 16:55:58
The spec requires "at most one entry having a `dh`
Peter Beverloo
2016/06/30 18:00:42
Done.
|
+ crypto_key_header_iterator.GetNext()) {} |
+ |
if (crypto_key_header_iterator.dh().empty()) { |
DLOG(ERROR) << "Invalid values supplied in the Crypto-Key header"; |
callback.Run(DECRYPTION_RESULT_INVALID_CRYPTO_KEY_HEADER, |