Update libsignal-client to 0.76.0

This commit is contained in:
Fedor Indutny
2025-06-30 11:43:41 -07:00
committed by GitHub
parent e55efbd6ee
commit e4e8fadb0f
43 changed files with 245 additions and 883 deletions

View File

@@ -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);
}