mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Include sender keys in SignalProtocolStore zones
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export type ZoneOptions = {
|
||||
readonly pendingSenderKeys?: boolean;
|
||||
readonly pendingSessions?: boolean;
|
||||
readonly pendingUnprocessed?: boolean;
|
||||
};
|
||||
@@ -12,6 +13,10 @@ export class Zone {
|
||||
private readonly options: ZoneOptions = {}
|
||||
) {}
|
||||
|
||||
public supportsPendingSenderKeys(): boolean {
|
||||
return this.options.pendingSenderKeys === true;
|
||||
}
|
||||
|
||||
public supportsPendingSessions(): boolean {
|
||||
return this.options.pendingSessions === true;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ import * as RemoteConfig from '../RemoteConfig';
|
||||
|
||||
import { strictAssert } from './assert';
|
||||
import * as log from '../logging/log';
|
||||
import { GLOBAL_ZONE } from '../SignalProtocolStore';
|
||||
|
||||
const ERROR_EXPIRED_OR_MISSING_DEVICES = 409;
|
||||
const ERROR_STALE_DEVICES = 410;
|
||||
@@ -861,7 +862,7 @@ async function encryptForSenderKey({
|
||||
parseIntOrThrow(ourDeviceId, 'encryptForSenderKey, ourDeviceId')
|
||||
);
|
||||
const ourAddress = getOurAddress();
|
||||
const senderKeyStore = new SenderKeys({ ourUuid });
|
||||
const senderKeyStore = new SenderKeys({ ourUuid, zone: GLOBAL_ZONE });
|
||||
const message = Buffer.from(padMessage(contentMessage));
|
||||
|
||||
const ciphertextMessage =
|
||||
|
||||
Reference in New Issue
Block a user