Add more debug logging

This commit is contained in:
lilia 2016-06-30 12:39:02 -07:00
parent 374d7115b9
commit 162bb9989a
4 changed files with 8 additions and 0 deletions

View File

@ -35307,6 +35307,8 @@ var Internal = Internal || {};
result = result | (a[i] ^ b[i]);
}
if (result !== 0) {
console.log('Our MAC ', dcodeIO.ByteBuffer.wrap(calculated_mac).toHex());
console.log('Their MAC', dcodeIO.ByteBuffer.wrap(mac).toHex());
throw new Error("Bad MAC");
}
});
@ -35722,6 +35724,7 @@ Internal.SessionRecord = function() {
index = i;
}
}
console.log("Deleting chain closed at", oldest.added);
delete session[util.toString(oldest.ephemeralKey)];
session.oldRatchetList.splice(index, 1);
}
@ -36256,6 +36259,7 @@ SessionCipher.prototype = {
return Promise.resolve();
}
console.log('New remote ephemeral key');
var ratchet = session.currentRatchet;
return Promise.resolve().then(function() {

View File

@ -247,6 +247,7 @@ SessionCipher.prototype = {
return Promise.resolve();
}
console.log('New remote ephemeral key');
var ratchet = session.currentRatchet;
return Promise.resolve().then(function() {

View File

@ -229,6 +229,7 @@ Internal.SessionRecord = function() {
index = i;
}
}
console.log("Deleting chain closed at", oldest.added);
delete session[util.toString(oldest.ephemeralKey)];
session.oldRatchetList.splice(index, 1);
}

View File

@ -97,6 +97,8 @@ var Internal = Internal || {};
result = result | (a[i] ^ b[i]);
}
if (result !== 0) {
console.log('Our MAC ', dcodeIO.ByteBuffer.wrap(calculated_mac).toHex());
console.log('Their MAC', dcodeIO.ByteBuffer.wrap(mac).toHex());
throw new Error("Bad MAC");
}
});