mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 02:18:15 +01:00
Update libsignal-client to 0.76.0
This commit is contained in:
@@ -9,7 +9,7 @@ import { CDSSocketBase, CDSSocketState } from './CDSSocketBase';
|
||||
import type { CDSSocketBaseOptionsType } from './CDSSocketBase';
|
||||
|
||||
export type CDSISocketOptionsType = Readonly<{
|
||||
mrenclave: Buffer;
|
||||
mrenclave: Uint8Array;
|
||||
}> &
|
||||
CDSSocketBaseOptionsType;
|
||||
|
||||
@@ -41,7 +41,7 @@ export class CDSISocket extends CDSSocketBase<CDSISocketOptionsType> {
|
||||
);
|
||||
}
|
||||
|
||||
this.socket.sendBytes(this.#cdsClient.initialRequest());
|
||||
this.socket.sendBytes(Buffer.from(this.#cdsClient.initialRequest()));
|
||||
|
||||
{
|
||||
const { done, value: message } = await this.socketIterator.next();
|
||||
@@ -55,9 +55,11 @@ export class CDSISocket extends CDSSocketBase<CDSISocketOptionsType> {
|
||||
|
||||
protected override async sendRequest(
|
||||
_version: number,
|
||||
request: Buffer
|
||||
request: Uint8Array
|
||||
): Promise<void> {
|
||||
this.socket.sendBytes(this.#cdsClient.establishedSend(request));
|
||||
this.socket.sendBytes(
|
||||
Buffer.from(this.#cdsClient.establishedSend(request))
|
||||
);
|
||||
|
||||
const { done, value: ciphertext } = await this.socketIterator.next();
|
||||
strictAssert(!done, 'CDSISocket.sendRequest(): expected token message');
|
||||
@@ -70,8 +72,8 @@ export class CDSISocket extends CDSSocketBase<CDSISocketOptionsType> {
|
||||
strictAssert(token, 'CDSISocket.sendRequest(): expected token');
|
||||
|
||||
this.socket.sendBytes(
|
||||
this.#cdsClient.establishedSend(
|
||||
Buffer.from(
|
||||
Buffer.from(
|
||||
this.#cdsClient.establishedSend(
|
||||
Proto.CDSClientRequest.encode({
|
||||
tokenAck: true,
|
||||
}).finish()
|
||||
@@ -81,8 +83,8 @@ export class CDSISocket extends CDSSocketBase<CDSISocketOptionsType> {
|
||||
}
|
||||
|
||||
protected override async decryptResponse(
|
||||
ciphertext: Buffer
|
||||
): Promise<Buffer> {
|
||||
ciphertext: Uint8Array
|
||||
): Promise<Uint8Array> {
|
||||
return this.#cdsClient.establishedRecv(ciphertext);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user