diff options
| author | Rohit Aggarwal <[email protected]> | 2018-03-08 17:10:09 +0000 |
|---|---|---|
| committer | Rohit Aggarwal <[email protected]> | 2018-03-08 17:10:09 +0000 |
| commit | 9e2755abae98ca4c48dff58e5d8c6fb42a093916 (patch) | |
| tree | 17ffce0435299bec23eb5e37aab73836db0fd6bf /openssl/src | |
| parent | Try out another curve (diff) | |
| download | rust-openssl-9e2755abae98ca4c48dff58e5d8c6fb42a093916.tar.xz rust-openssl-9e2755abae98ca4c48dff58e5d8c6fb42a093916.zip | |
Get curves for OpenSSL tests itself
Diffstat (limited to 'openssl/src')
| -rw-r--r-- | openssl/src/ecdsa.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openssl/src/ecdsa.rs b/openssl/src/ecdsa.rs index f7386861..8ab24e91 100644 --- a/openssl/src/ecdsa.rs +++ b/openssl/src/ecdsa.rs @@ -127,9 +127,14 @@ mod test { use ec::EcGroup; use super::*; - static CURVE_IDENTIFER: Nid = Nid::X9_62_C2TNB191V1; static DGST_LEN: i32 = 20; + #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] + static CURVE_IDENTIFER: Nid = Nid::X9_62_PRIME192V1; + + #[cfg(osslconf = "OPENSSL_NO_EC2M")] + static CURVE_IDENTIFER: Nid = Nid::X9_62_C2TNB191V1; + fn get_public_key(group: &EcGroup, x: &EcKey<Private>) -> Result<EcKey<Public>, ErrorStack> { let public_key_point = x.public_key(); Ok(EcKey::from_public_key(group, public_key_point)?) |