Introduce new simultaneous initiate strategy.

1) Fix bugs that prevented decrypt() from being non-transactional
   in some cases.

2) Introduce a new unified storage interface.

3) Transition simultaneous initiate from the "needs refresh"
   strategy to one that uses session state resurrection and
   promotion.
This commit is contained in:
Moxie Marlinspike
2014-09-07 15:08:15 -07:00
parent 73b75a4a27
commit 355d0be78a
10 changed files with 824 additions and 293 deletions

View File

@@ -35,9 +35,7 @@ public class SessionUtil {
int deviceId = recipientDevice.getDeviceId();
SessionStore sessionStore = new TextSecureSessionStore(context, masterSecret);
return
sessionStore.containsSession(recipientId, deviceId) &&
!sessionStore.loadSession(recipientId, deviceId).getSessionState().getNeedsRefresh();
return sessionStore.containsSession(recipientId, deviceId);
}
}