Request new keys (largely untested)

This commit is contained in:
Matt Corallo 2014-05-28 01:14:16 +02:00
parent 56433bd9af
commit aec36468bc
4 changed files with 88 additions and 69 deletions

View file

@ -231,6 +231,11 @@ window.textsecure.crypto = new function() {
throw new Error("Datastore inconsistency: session was stored without identity key");
}
// Used when device keys change - we assume key compromise so refuse all new messages
self.forceRemoveAllSessions = function(encodedNumber) {
textsecure.storage.removeEncrypted("session" + encodedNumber);
}
/*****************************
*** Internal Crypto stuff ***