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

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

Issue 379383002: Refactor WebCrypto code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto master (no longer has BoringSSL) Created 6 years, 5 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 103c4edf6b5eafc854e62820687ecd76106dc9c9..29bebe555261f9a8802702af7affd1a553942f97 100644
--- a/content/child/webcrypto/status.h
+++ b/content/child/webcrypto/status.h
@@ -69,10 +69,6 @@ class CONTENT_EXPORT Status {
// incompatible with the value requested by the Web Crypto call.
static Status ErrorJwkExtInconsistent();
- // The "alg" parameter could not be converted to an equivalent
- // WebCryptoAlgorithm. Either it was malformed or unrecognized.
- static Status ErrorJwkUnrecognizedAlgorithm();
-
// The "alg" parameter is incompatible with the (optional) Algorithm
// specified by the Web Crypto import operation.
static Status ErrorJwkAlgorithmInconsistent();
@@ -97,9 +93,9 @@ class CONTENT_EXPORT Status {
// are incompatible with each other.
static Status ErrorJwkUseAndKeyopsInconsistent();
- // The "kty" parameter was given and was a string, however it was
- // unrecognized.
- static Status ErrorJwkUnrecognizedKty();
+ // The "kty" parameter was given and was a string, however it was not the
+ // expected value.
+ static Status ErrorJwkUnexpectedKty(const std::string& expected);
// The amount of key data provided was incompatible with the selected
// algorithm. For instance if the algorith name was A128CBC then EXACTLY
@@ -120,6 +116,14 @@ class CONTENT_EXPORT Status {
// key data there.
static Status ErrorImportEmptyKeyData();
+ // Tried importing a key using an unsupported format for the key type (for
+ // instance importing an HMAC key using format=spki).
+ static Status ErrorUnsupportedImportKeyFormat();
+
+ // Tried exporting a key using an unsupported format for the key type (for
+ // instance exporting an HMAC key using format=spki).
+ static Status ErrorUnsupportedExportKeyFormat();
+
// The key data buffer provided for importKey() is an incorrect length for
// AES.
static Status ErrorImportAesKeyLength();
« 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