Skip to content

Commit

Permalink
Merge pull request #497 from tchapgouv/phlpro/486-hide-verif
Browse files Browse the repository at this point in the history
Remove crossSigning activation in 2 other cases
  • Loading branch information
Phl-Pro authored Apr 6, 2022
2 parents a4e3378 + ba09dcf commit d69a6fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Riot/Modules/Application/LegacyAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2404,11 +2404,13 @@ - (void)handleAppState
case MXSessionStateSyncInProgress:
// Stay in launching during the first server sync if the store is empty.
isLaunching = (mainSession.rooms.count == 0 && launchAnimationContainerView);

// Tchap: Disable Cross Signing Managment.
#ifdef SUPPORT_KEYS_BACKUP
if (mainSession.crypto.crossSigning && mainSession.crypto.crossSigning.state == MXCrossSigningStateCrossSigningExists)
{
[mainSession.crypto setOutgoingKeyRequestsEnabled:NO onComplete:nil];
}
#endif
break;
case MXSessionStateRunning:
self.clearingCache = NO;
Expand Down
3 changes: 3 additions & 0 deletions Riot/Modules/Room/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -6100,12 +6100,15 @@ - (void)reRequestKeysAndShowExplanationAlert:(MXEvent*)event
MXWeakify(self);
__block UIAlertController *alert;

// Tchap: Disable Cross Signing Managment.
#ifdef SUPPORT_KEYS_BACKUP
// Force device verification if session has cross-signing activated and device is not yet verified
if (self.mainSession.crypto.crossSigning && self.mainSession.crypto.crossSigning.state == MXCrossSigningStateCrossSigningExists)
{
[self presentReviewUnverifiedSessionsAlert];
return;
}
#endif

// Make the re-request
[self.mainSession.crypto reRequestRoomKeyForEvent:event];
Expand Down

0 comments on commit d69a6fe

Please sign in to comment.