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

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

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/status.h ('k') | content/child/webcrypto/structured_clone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/status.cc
diff --git a/content/child/webcrypto/status.cc b/content/child/webcrypto/status.cc
index fc01c2c290a981a658811eabb843d752d2a4541d..9439c933db13e999fb7dec2deaf30eac2b33c9da 100644
--- a/content/child/webcrypto/status.cc
+++ b/content/child/webcrypto/status.cc
@@ -58,11 +58,6 @@ Status Status::ErrorJwkExtInconsistent() {
"specified by the Web Crypto call");
}
-Status Status::ErrorJwkUnrecognizedAlgorithm() {
- return Status(blink::WebCryptoErrorTypeData,
- "The JWK \"alg\" property was not recognized");
-}
-
Status Status::ErrorJwkAlgorithmInconsistent() {
return Status(blink::WebCryptoErrorTypeData,
"The JWK \"alg\" property was inconsistent with that specified "
@@ -99,9 +94,9 @@ Status Status::ErrorJwkUseAndKeyopsInconsistent() {
"but are inconsistent with each other.");
}
-Status Status::ErrorJwkUnrecognizedKty() {
+Status Status::ErrorJwkUnexpectedKty(const std::string& expected) {
return Status(blink::WebCryptoErrorTypeData,
- "The JWK \"kty\" property was unrecognized");
+ "The JWK \"kty\" property was not \"" + expected + "\"");
}
Status Status::ErrorJwkIncorrectKeyLength() {
@@ -120,6 +115,16 @@ Status Status::ErrorImportEmptyKeyData() {
return Status(blink::WebCryptoErrorTypeData, "No key data was provided");
}
+Status Status::ErrorUnsupportedImportKeyFormat() {
+ return Status(blink::WebCryptoErrorTypeNotSupported,
+ "Unsupported import key format for algorithm");
+}
+
+Status Status::ErrorUnsupportedExportKeyFormat() {
+ return Status(blink::WebCryptoErrorTypeNotSupported,
+ "Unsupported export key format for algorithm");
+}
+
Status Status::ErrorImportAesKeyLength() {
return Status(blink::WebCryptoErrorTypeData,
"AES key data must be 128, 192 or 256 bits");
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/structured_clone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698