Skip to content

Commit

Permalink
Merge pull request #1954 from sfackler/alex-patch-1
Browse files Browse the repository at this point in the history
Fixed type mutability on asn1_flag
  • Loading branch information
alex committed Jun 4, 2023
2 parents 92dca6b + 1b9fba4 commit 64b3106
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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 asn1_flag(&mut self) -> Asn1Flag {
pub fn asn1_flag(&self) -> Asn1Flag {
unsafe { Asn1Flag(ffi::EC_GROUP_get_asn1_flag(self.as_ptr())) }
}

Expand Down Expand Up @@ -1275,7 +1275,7 @@ mod test {
#[test]
#[cfg(any(boringssl, ossl111, libressl350))]
fn asn1_flag() {
let mut group = EcGroup::from_curve_name(Nid::X9_62_PRIME256V1).unwrap();
let group = EcGroup::from_curve_name(Nid::X9_62_PRIME256V1).unwrap();
let flag = group.asn1_flag();
assert_eq!(flag, Asn1Flag::NAMED_CURVE);
}
Expand Down

0 comments on commit 64b3106

Please sign in to comment.