Store arrayBuffers in database for remote identity keys
This commit is contained in:
parent
68af1ae1ea
commit
70eed938d9
3 changed files with 13 additions and 16 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue