Move prekey sigcheck to libaxolotl

This commit is contained in:
Matt Corallo 2015-01-15 21:52:50 -10:00 committed by lilia
parent cb6cb4ff89
commit 12844590f5
3 changed files with 20 additions and 17 deletions

View file

@ -196,15 +196,12 @@ window.textsecure.api = function () {
for (var i = 0; i < res.devices.length; i++) {
res.devices[i].signedPreKey.publicKey = StringView.base64ToBytes(res.devices[i].signedPreKey.publicKey);
res.devices[i].signedPreKey.signature = StringView.base64ToBytes(res.devices[i].signedPreKey.signature);
promises[i] = window.axolotl.crypto.Ed25519Verify(res.identityKey, res.devices[i].signedPreKey.publicKey, res.devices[i].signedPreKey.signature);
res.devices[i].preKey.publicKey = StringView.base64ToBytes(res.devices[i].preKey.publicKey);
//TODO: Is this still needed?
//if (res.devices[i].keyId === undefined)
// res.devices[i].keyId = 0;
}
return Promise.all(promises).then(function() {
return res;
});
return res;
});
};