Move SecretSessionCipher to TypeScript
This commit is contained in:
parent
7e629edd21
commit
c9ffb7c014
11 changed files with 569 additions and 283 deletions
|
@ -26,6 +26,10 @@ import {
|
|||
UnregisteredUserError,
|
||||
} from './Errors';
|
||||
import { isValidNumber } from '../types/PhoneNumber';
|
||||
import {
|
||||
SecretSessionCipher,
|
||||
SerializedCertificateType,
|
||||
} from '../metadata/SecretSessionCipher';
|
||||
|
||||
type OutgoingMessageOptionsType = SendOptionsType & {
|
||||
online?: boolean;
|
||||
|
@ -58,7 +62,7 @@ export default class OutgoingMessage {
|
|||
|
||||
sendMetadata?: SendMetadataType;
|
||||
|
||||
senderCertificate?: ArrayBuffer;
|
||||
senderCertificate?: SerializedCertificateType;
|
||||
|
||||
online?: boolean;
|
||||
|
||||
|
@ -384,8 +388,8 @@ export default class OutgoingMessage {
|
|||
options.messageKeysLimit = false;
|
||||
}
|
||||
|
||||
if (sealedSender) {
|
||||
const secretSessionCipher = new window.Signal.Metadata.SecretSessionCipher(
|
||||
if (sealedSender && senderCertificate) {
|
||||
const secretSessionCipher = new SecretSessionCipher(
|
||||
window.textsecure.storage.protocol
|
||||
);
|
||||
ciphers[address.getDeviceId()] = secretSessionCipher;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue