Update libaxolotl, handle untrusted identitykey
Previously we had no access to the new untrusted identity for verification purposes. // FREEBIE
This commit is contained in:
parent
af48ca9e4b
commit
cc303e0802
4 changed files with 16 additions and 10 deletions
|
@ -37201,7 +37201,9 @@ window.axolotl.protocol = function(storage_interface) {
|
|||
closeSession(open_session); // To be returned and saved later
|
||||
} else {
|
||||
// ...otherwise create an error that the UI will pick up and ask the user if they want to re-negotiate
|
||||
throw new Error('Unknown identity key');
|
||||
var e = new Error('Unknown identity key');
|
||||
e.identityKey = message.identityKey.toArrayBuffer();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
return initSession(false, preKeyPair, signedPreKeyPair, encodedNumber, axolotlInternal.utils.convertToArrayBuffer(message.identityKey), axolotlInternal.utils.convertToArrayBuffer(message.baseKey), undefined)
|
||||
|
@ -37364,8 +37366,8 @@ window.axolotl.protocol = function(storage_interface) {
|
|||
}
|
||||
|
||||
// Inits a session (maybe) and then decrypts the message
|
||||
self.handlePreKeyWhisperMessage = function(from, encodedMessage) {
|
||||
var preKeyProto = axolotlInternal.protobuf.PreKeyWhisperMessage.decode(encodedMessage);
|
||||
self.handlePreKeyWhisperMessage = function(from, encodedMessage, encoding) {
|
||||
var preKeyProto = axolotlInternal.protobuf.PreKeyWhisperMessage.decode(encodedMessage, encoding);
|
||||
return initSessionFromPreKeyWhisperMessage(from, preKeyProto).then(function(sessions) {
|
||||
return doDecryptWhisperMessage(from, axolotlInternal.utils.convertToString(preKeyProto.message), sessions[0], preKeyProto.registrationId).then(function(result) {
|
||||
if (sessions[1] !== undefined)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue