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"); |