aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domexception.rs
diff options
context:
space:
mode:
authorDaniel Adams <70986246+msub2@users.noreply.github.com>2024-10-20 21:32:19 -1000
committerGitHub <noreply@github.com>2024-10-21 07:32:19 +0000
commit45267c9f280708d1af1d60cb1bc3fad4cd71157d (patch)
treed144c56d5441aad1b417b3cbf8c5a87172e139ef /components/script/dom/domexception.rs
parent397c5adf79dd278d70d27d80cd6deccea2d97bc8 (diff)
downloadservo-45267c9f280708d1af1d60cb1bc3fad4cd71157d.tar.gz
servo-45267c9f280708d1af1d60cb1bc3fad4cd71157d.zip
crypto: Implement encrypt/decrypt for AES-CBC + JWK support (#33795)
* Add support for raw importKey with AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Support JWK import/export, importKey for AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement encrypt/decrypt for AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update Cargo.lock Signed-off-by: Daniel Adams <msub2official@gmail.com> * Pass MutableHandleObject as arg instead of returning raw pointer Signed-off-by: Daniel Adams <msub2official@gmail.com> * Swap order of checks in generate_key_aes_cbc - Fixes WPT tests that expect to error on algorithm first before usages Signed-off-by: Daniel Adams <msub2official@gmail.com> * Avoid potential GC hazard with array_buffer_ptr Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations for discards context Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
Diffstat (limited to 'components/script/dom/domexception.rs')
-rw-r--r--components/script/dom/domexception.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs
index eb97c1215ff..5f3ac73d3f2 100644
--- a/components/script/dom/domexception.rs
+++ b/components/script/dom/domexception.rs
@@ -45,6 +45,7 @@ pub enum DOMErrorName {
DataCloneError = DOMExceptionConstants::DATA_CLONE_ERR,
EncodingError,
NotReadableError,
+ DataError,
OperationError,
}
@@ -75,6 +76,7 @@ impl DOMErrorName {
"DataCloneError" => Some(DOMErrorName::DataCloneError),
"EncodingError" => Some(DOMErrorName::EncodingError),
"NotReadableError" => Some(DOMErrorName::NotReadableError),
+ "DataError" => Some(DOMErrorName::DataError),
"OperationError" => Some(DOMErrorName::OperationError),
_ => None,
}
@@ -123,6 +125,7 @@ impl DOMException {
"The encoding operation (either encoded or decoding) failed."
},
DOMErrorName::NotReadableError => "The I/O read operation failed.",
+ DOMErrorName::DataError => "Provided data is inadequate.",
DOMErrorName::OperationError => {
"The operation failed for an operation-specific reason."
},