Skip to content

Commit

Permalink
rename and test on openssl 1.1.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
reaperhulk committed Jun 4, 2023
1 parent 69f9491 commit ebf3198
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions openssl/src/ec.rs
Expand Up @@ -296,7 +296,7 @@ impl EcGroupRef {

/// Gets the flag determining if the group corresponds to a named curve.
#[corresponds(EC_GROUP_get_asn1_flag)]
pub fn get_asn1_flag(&mut self) -> Asn1Flag {
pub fn asn1_flag(&mut self) -> Asn1Flag {
unsafe { Asn1Flag(ffi::EC_GROUP_get_asn1_flag(self.as_ptr())) }
}

Expand Down Expand Up @@ -1273,9 +1273,10 @@ mod test {
}

#[test]
fn get_flags() {
#[cfg(not(any(ossl102, ossl101)))]
fn asn1_flag() {
let mut group = EcGroup::from_curve_name(Nid::X9_62_PRIME256V1).unwrap();
let flag = group.get_asn1_flag();
let flag = group.asn1_flag();
assert_eq!(flag.0, Asn1Flag::NAMED_CURVE.0);
}
}

0 comments on commit ebf3198

Please sign in to comment.