Move prekey sigcheck to libaxolotl
This commit is contained in:
@@ -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;
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user