Invalidate memory cache when storing own cross-signing keys

When another device does cross-signing reset we would incorrectly
cache the old keys indefinitely.
This commit is contained in:
Toni Spets 2024-04-02 13:38:55 +03:00 committed by Toni Spets
commit 64cc843952

View file

@ -96,5 +96,12 @@ func (mach *OlmMachine) storeCrossSigningKeys(ctx context.Context, crossSigningK
}
}
}
// Clear internal cache so that it refreshes from crypto store
if userID == mach.Client.UserID && mach.crossSigningPubkeys != nil {
log.Debug().Msg("Resetting internal cross-signing key cache")
mach.crossSigningPubkeys = nil
mach.crossSigningPubkeysFetched = false
}
}
}