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

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

Issue 141853006: [webcrypto] Validate JWK import of AES keys: key length must match algorithm. (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
« no previous file with comments | « content/renderer/webcrypto/webcrypto_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto/webcrypto_util.cc
diff --git a/content/renderer/webcrypto/webcrypto_util.cc b/content/renderer/webcrypto/webcrypto_util.cc
index 29b0713d62bcb201c3807bf834f67e6fff8fd999..7581ef7e34485ef7a9bf7591481c8a217562358c 100644
--- a/content/renderer/webcrypto/webcrypto_util.cc
+++ b/content/renderer/webcrypto/webcrypto_util.cc
@@ -92,6 +92,11 @@ Status Status::ErrorJwkUnrecognizedKty() {
return Status("The JWK \"kty\" property was unrecognized");
}
+Status Status::ErrorJwkIncorrectKeyLength() {
+ return Status("The JWK \"k\" property did not include the right length "
+ "of key data for the given algorithm.");
+}
+
Status Status::ErrorImportEmptyKeyData() {
return Status("No key data was provided");
}
« no previous file with comments | « content/renderer/webcrypto/webcrypto_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698