Remove 1000 messageKey limit entirely, along with custom limits (#42)
This commit is contained in:
parent
d08705329a
commit
a80285cc83
18
dist/libsignal-protocol.js
vendored
18
dist/libsignal-protocol.js
vendored
@ -36014,14 +36014,7 @@ libsignal.SessionBuilder = function (storage, remoteAddress) {
|
||||
this.processV3 = builder.processV3.bind(builder);
|
||||
};
|
||||
|
||||
function SessionCipher(storage, remoteAddress, options) {
|
||||
options = options || {};
|
||||
|
||||
if (typeof options.messageKeysLimit === 'undefined') {
|
||||
options.messageKeysLimit = 1000;
|
||||
}
|
||||
|
||||
this.messageKeysLimit = options.messageKeysLimit;
|
||||
function SessionCipher(storage, remoteAddress) {
|
||||
this.remoteAddress = remoteAddress;
|
||||
this.storage = storage;
|
||||
}
|
||||
@ -36294,11 +36287,6 @@ SessionCipher.prototype = {
|
||||
});
|
||||
},
|
||||
fillMessageKeys: function(chain, counter) {
|
||||
if (this.messageKeysLimit && Object.keys(chain.messageKeys).length >= this.messageKeysLimit) {
|
||||
console.log("Too many message keys for chain");
|
||||
return Promise.resolve(); // Stalker, much?
|
||||
}
|
||||
|
||||
if (chain.chainKey.counter >= counter) {
|
||||
return Promise.resolve(); // Already calculated
|
||||
}
|
||||
@ -36435,8 +36423,8 @@ SessionCipher.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
libsignal.SessionCipher = function(storage, remoteAddress, options) {
|
||||
var cipher = new SessionCipher(storage, remoteAddress, options);
|
||||
libsignal.SessionCipher = function(storage, remoteAddress) {
|
||||
var cipher = new SessionCipher(storage, remoteAddress);
|
||||
|
||||
// returns a Promise that resolves to a ciphertext object
|
||||
this.encrypt = cipher.encrypt.bind(cipher);
|
||||
|
||||
@ -1,11 +1,4 @@
|
||||
function SessionCipher(storage, remoteAddress, options) {
|
||||
options = options || {};
|
||||
|
||||
if (typeof options.messageKeysLimit === 'undefined') {
|
||||
options.messageKeysLimit = 1000;
|
||||
}
|
||||
|
||||
this.messageKeysLimit = options.messageKeysLimit;
|
||||
function SessionCipher(storage, remoteAddress) {
|
||||
this.remoteAddress = remoteAddress;
|
||||
this.storage = storage;
|
||||
}
|
||||
@ -278,11 +271,6 @@ SessionCipher.prototype = {
|
||||
});
|
||||
},
|
||||
fillMessageKeys: function(chain, counter) {
|
||||
if (this.messageKeysLimit && Object.keys(chain.messageKeys).length >= this.messageKeysLimit) {
|
||||
console.log("Too many message keys for chain");
|
||||
return Promise.resolve(); // Stalker, much?
|
||||
}
|
||||
|
||||
if (chain.chainKey.counter >= counter) {
|
||||
return Promise.resolve(); // Already calculated
|
||||
}
|
||||
@ -419,8 +407,8 @@ SessionCipher.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
libsignal.SessionCipher = function(storage, remoteAddress, options) {
|
||||
var cipher = new SessionCipher(storage, remoteAddress, options);
|
||||
libsignal.SessionCipher = function(storage, remoteAddress) {
|
||||
var cipher = new SessionCipher(storage, remoteAddress);
|
||||
|
||||
// returns a Promise that resolves to a ciphertext object
|
||||
this.encrypt = cipher.encrypt.bind(cipher);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user