Store arrayBuffers in database for remote identity keys

This commit is contained in:
Scott Nonnenberg 2018-10-26 11:37:51 -07:00
parent 68af1ae1ea
commit 70eed938d9
3 changed files with 13 additions and 16 deletions

View file

@ -289,18 +289,11 @@ SecretSessionCipher.prototype = {
signalProtocolStore,
destinationAddress
);
const sessionRecord = await sessionCipher.getRecord(
destinationAddress.toString()
);
const openSession = sessionRecord.getOpenSession();
if (!openSession) {
throw new Error('No active session');
}
const message = await sessionCipher.encrypt(paddedPlaintext);
const ourIdentity = await signalProtocolStore.getIdentityKeyPair();
const theirIdentity = fromEncodedBinaryToArrayBuffer(
openSession.indexInfo.remoteIdentityKey
await signalProtocolStore.loadIdentityKey(destinationAddress.getName())
);
const ephemeral = await libsignal.Curve.async.generateKeyPair();