Commit 9e2755ab authored by Rohit Aggarwal's avatar Rohit Aggarwal
Browse files

Get curves for OpenSSL tests itself

parent 0a38b5a9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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)?)