summaryrefslogtreecommitdiff
path: root/ext/crypto/shared.rs
diff options
context:
space:
mode:
authorSean Michael Wykes <8363933+SeanWykes@users.noreply.github.com>2021-12-16 13:28:43 -0300
committerGitHub <noreply@github.com>2021-12-16 17:28:43 +0100
commit60faf7a0edd492771943e603ec3d01c3602150e8 (patch)
tree81de27bb87d50365b8245a37691faf92d3a787b1 /ext/crypto/shared.rs
parent8efe829fca5ddea855b7f569c74b67c161ec4b06 (diff)
feat(ext/crypto): support importing ECSDA and ECDH (#13088)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'ext/crypto/shared.rs')
-rw-r--r--ext/crypto/shared.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/crypto/shared.rs b/ext/crypto/shared.rs
index 1a0703b26..3b32bb2a2 100644
--- a/ext/crypto/shared.rs
+++ b/ext/crypto/shared.rs
@@ -37,6 +37,13 @@ pub const RSAES_OAEP_OID: rsa::pkcs8::ObjectIdentifier =
pub const ID_P_SPECIFIED: rsa::pkcs8::ObjectIdentifier =
rsa::pkcs8::ObjectIdentifier::new("1.2.840.113549.1.1.9");
+pub const ID_SECP256R1_OID: rsa::pkcs8::ObjectIdentifier =
+ rsa::pkcs8::ObjectIdentifier::new("1.2.840.10045.3.1.7");
+pub const ID_SECP384R1_OID: rsa::pkcs8::ObjectIdentifier =
+ rsa::pkcs8::ObjectIdentifier::new("1.3.132.0.34");
+pub const ID_SECP521R1_OID: rsa::pkcs8::ObjectIdentifier =
+ rsa::pkcs8::ObjectIdentifier::new("1.3.132.0.35");
+
#[derive(Serialize, Deserialize, Copy, Clone, PartialEq)]
pub enum ShaHash {
#[serde(rename = "SHA-1")]
@@ -55,6 +62,8 @@ pub enum EcNamedCurve {
P256,
#[serde(rename = "P-384")]
P384,
+ #[serde(rename = "P-521")]
+ P521,
}
#[derive(Serialize, Deserialize)]