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

Unified Diff: content/child/webcrypto/status.h

Issue 282133002: [webcryto] Validate key usages during key creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on master Created 6 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
« no previous file with comments | « content/child/webcrypto/shared_crypto_unittest.cc ('k') | content/child/webcrypto/status.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/status.h
diff --git a/content/child/webcrypto/status.h b/content/child/webcrypto/status.h
index 02f2495cb29da005379c8dbd0f22316035fcc593..8dbfce6e0c643ea11c02aef5aeb7912ef849489a 100644
--- a/content/child/webcrypto/status.h
+++ b/content/child/webcrypto/status.h
@@ -19,11 +19,6 @@ namespace webcrypto {
//
// As such, it is important that errors DO NOT reveal any sensitive material
// (like key bytes).
-//
-// Care must be taken with what errors are reported back to Blink when doing
-// compound operations like unwrapping a JWK key. In this case, errors
-// generated by the JWK import are not appropriate to report since the wrapped
-// JWK is not visible to the caller.
class CONTENT_EXPORT Status {
public:
Status() : type_(TYPE_ERROR) {}
@@ -187,6 +182,11 @@ class CONTENT_EXPORT Status {
// zero, or it was not a multiple of 8 bits.
static Status ErrorGenerateKeyLength();
+ // Attempted to create a key (either by importKey(), generateKey(), or
+ // unwrapKey()) however the key usages were not applicable for the key type
+ // and algorithm.
+ static Status ErrorCreateKeyBadUsages();
+
private:
enum Type { TYPE_ERROR, TYPE_SUCCESS };
« no previous file with comments | « content/child/webcrypto/shared_crypto_unittest.cc ('k') | content/child/webcrypto/status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698