Initialize session.currentRatchet.previousCounter

This commit is contained in:
lilia 2014-11-03 19:01:18 -08:00
parent aa937ae1d1
commit db76c7e164

View file

@ -406,7 +406,7 @@ window.textsecure.crypto = function() {
sharedSecret.set(new Uint8Array(ecRes), 32 * 3);
return HKDF(sharedSecret.buffer, '', "WhisperText").then(function(masterKey) {
var session = {currentRatchet: { rootKey: masterKey[0], lastRemoteEphemeralKey: theirSignedPubKey },
var session = {currentRatchet: { rootKey: masterKey[0], lastRemoteEphemeralKey: theirSignedPubKey, previousCounter: 0 },
indexInfo: { remoteIdentityKey: theirIdentityPubKey, closed: -1 },
oldRatchetList: []
};