Skip to content

Commit

Permalink
Review: Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Jul 17, 2024
1 parent c57e5bf commit daf7331
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/matrix-sdk-crypto/src/identities/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@ pub(crate) mod tests {
assert!(!first_device.is_cross_signed_by_owner(&identity));

let remember_previous_identity = other_identity.clone();
// We receive a new keys update for that user, with no identity anymore
// We receive updated keys for that user, with no identity anymore.
// Notice that there is no server API to delete identity, but we want to test
// here that a home server cannot clear the identity and serve a new one
// after that would get automatically approved.
Expand Down
5 changes: 4 additions & 1 deletion crates/matrix-sdk-crypto/src/identities/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,10 @@ impl ReadOnlyUserIdentity {
) -> Result<bool, SignatureError> {
master_key.verify_subkey(&self_signing_key)?;

// The pin is maintained.
// We update the identity with the new master and self signing key, but we keep
// the previous pinned master key.
// This identity will have a pin violation until the new master key is pinned
// (see [`has_pin_violation`]).
let pinned_master_key = self.pinned_master_key.read().unwrap().clone();

let new = Self {
Expand Down

0 comments on commit daf7331

Please sign in to comment.