You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
Fix EC key conversion & constraints
This commit is contained in:
@ -221,7 +221,7 @@ impl<'a> ConstraintSet<'a> {
|
||||
ConstraintDecision::Positive => score += 1,
|
||||
ConstraintDecision::Neutral => {}
|
||||
// If any constraint was negative, don't add it to the candidates
|
||||
ConstraintDecision::Negative => break 'outer,
|
||||
ConstraintDecision::Negative => continue 'outer,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ mod ec_impls {
|
||||
.get(..FieldSize::<C>::USIZE)
|
||||
.ok_or_else(Self::Error::default)?;
|
||||
let y = value
|
||||
.x
|
||||
.y
|
||||
.get(..FieldSize::<C>::USIZE)
|
||||
.ok_or_else(Self::Error::default)?;
|
||||
|
||||
@ -220,7 +220,7 @@ mod legacy {
|
||||
y.try_into()
|
||||
.map_err(|_| anyhow::anyhow!("invalid curve parameter y"))?,
|
||||
),
|
||||
_ => bail!("Wrong key type"),
|
||||
_ => bail!("Wrong curve"),
|
||||
};
|
||||
|
||||
let point = sec1::EncodedPoint::from_affine_coordinates(&x.into(), &y.into(), false);
|
||||
|
Reference in New Issue
Block a user