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

Unified Diff: content/renderer/webcrypto/platform_crypto_nss.cc

Issue 165373008: [webcrypto] Reject AES-GCM tag lengths other than 32, 64, 96, 104, 112, 120, 128. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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: content/renderer/webcrypto/platform_crypto_nss.cc
diff --git a/content/renderer/webcrypto/platform_crypto_nss.cc b/content/renderer/webcrypto/platform_crypto_nss.cc
index c297c204c023c2bc3428fe10fcb706ddcc1e95f6..4cc7b3722e9d48f0ac1e8dcf44dd04e044b6f265 100644
--- a/content/renderer/webcrypto/platform_crypto_nss.cc
+++ b/content/renderer/webcrypto/platform_crypto_nss.cc
@@ -293,9 +293,6 @@ Status AesGcmEncryptDecrypt(EncryptOrDecrypt mode,
if (!g_aes_gcm_support.Get().IsSupported())
return Status::ErrorUnsupported();
- // TODO(eroman): Is this necessary?
- if ((tag_length_bits % 8) != 0)
- return Status::ErrorInvalidAesGcmTagLength();
unsigned int tag_length_bytes = tag_length_bits / 8;
CK_GCM_PARAMS gcm_params = {0};

Powered by Google App Engine
This is Rietveld 408576698