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

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

Issue 118623002: [webcrypto] Add raw symmetric key AES-KW wrap/unwrap for NSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed ASSERTS from last change to EXPECTS, to match original code intent 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') | content/test/data/webcrypto/aes_kw.json » ('j') | 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 a72805640570009d8dcfc5f2b10a0bbf5b8128fa..3b565cfab478d97f32cbe1b9b6169187e3b21ce9 100644
--- a/content/renderer/webcrypto/webcrypto_util.cc
+++ b/content/renderer/webcrypto/webcrypto_util.cc
@@ -112,6 +112,10 @@ Status Status::ErrorDataTooLarge() {
return Status("The provided data is too large");
}
+Status Status::ErrorDataTooSmall() {
+ return Status("The provided data is too small");
+}
+
Status Status::ErrorUnsupported() {
return Status("The requested operation is unsupported");
}
@@ -126,6 +130,12 @@ Status Status::ErrorInvalidAesGcmTagLength() {
"bits");
}
+Status Status::ErrorInvalidAesKwDataLength() {
+ return Status(
+ "The AES-KW input data length is invalid: not a multiple of 8 "
+ "bytes");
+}
+
Status Status::ErrorGenerateKeyPublicExponent() {
return Status("The \"publicExponent\" is either empty, zero, or too large");
}
@@ -136,6 +146,12 @@ Status Status::ErrorMissingAlgorithmImportRawKey() {
"raw-formatted key.");
}
+Status Status::ErrorMissingAlgorithmUnwrapRawKey() {
+ return Status(
+ "The key's algorithm must be specified when unwrapping a "
+ "raw-formatted key.");
+}
+
Status Status::ErrorImportRsaEmptyModulus() {
return Status("The modulus is empty");
}
« no previous file with comments | « content/renderer/webcrypto/webcrypto_util.h ('k') | content/test/data/webcrypto/aes_kw.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698