summaryrefslogtreecommitdiff
path: root/ext/crypto/lib.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-09-13 11:35:49 +0200
committerGitHub <noreply@github.com>2021-09-13 11:35:49 +0200
commitd0b5ff6db9ec42f645210de7c4806bad385bdfaf (patch)
tree18db6aa2147288c4c8db3b9c8b8f23d177d8013d /ext/crypto/lib.rs
parent2199bdaf64c59c69f53079362e902355325cfa37 (diff)
feat(ext/crypto): generate ECDH keys (#11870)
Add support for ECDH algorithm in SubtleCrypto#generateKey.
Diffstat (limited to 'ext/crypto/lib.rs')
-rw-r--r--ext/crypto/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/crypto/lib.rs b/ext/crypto/lib.rs
index cf2c379a0..47137b210 100644
--- a/ext/crypto/lib.rs
+++ b/ext/crypto/lib.rs
@@ -168,7 +168,7 @@ pub async fn op_crypto_generate_key(
private_key.to_pkcs1_der()?.as_ref().to_vec()
}
- Algorithm::Ecdsa => {
+ Algorithm::Ecdsa | Algorithm::Ecdh => {
let curve: &EcdsaSigningAlgorithm =
args.named_curve.ok_or_else(not_supported)?.into();
let rng = RingRand::SystemRandom::new();