From 8a92a4dd257372582620dfa193aa2a7caa10373f Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 28 Feb 2025 18:11:26 +0100 Subject: [PATCH] Fix cli build --- apps/cli/src/admin-console/commands/confirm.command.ts | 2 +- .../auth-requests/organization-auth-request.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/cli/src/admin-console/commands/confirm.command.ts b/apps/cli/src/admin-console/commands/confirm.command.ts index 0d5c7ba069c..9c0ed7a447d 100644 --- a/apps/cli/src/admin-console/commands/confirm.command.ts +++ b/apps/cli/src/admin-console/commands/confirm.command.ts @@ -57,7 +57,7 @@ export class ConfirmCommand { } const publicKeyResponse = await this.apiService.getUserPublicKey(orgUser.userId); const publicKey = Utils.fromB64ToArray(publicKeyResponse.publicKey); - const key = await this.encryptService.rsaEncrypt(orgKey.key, publicKey); + const key = await this.encryptService.rsaEncrypt(orgKey.toEncoded(), publicKey); const req = new OrganizationUserConfirmRequest(); req.key = key.encryptedString; await this.organizationUserApiService.postOrganizationUserConfirm( diff --git a/bitwarden_license/bit-common/src/admin-console/auth-requests/organization-auth-request.service.ts b/bitwarden_license/bit-common/src/admin-console/auth-requests/organization-auth-request.service.ts index 025b021f83d..c8bf096bf66 100644 --- a/bitwarden_license/bit-common/src/admin-console/auth-requests/organization-auth-request.service.ts +++ b/bitwarden_license/bit-common/src/admin-console/auth-requests/organization-auth-request.service.ts @@ -126,6 +126,6 @@ export class OrganizationAuthRequestService { const userKey = new SymmetricCryptoKey(decValue); // Re-encrypt user Key with the Device Public Key - return await this.encryptService.rsaEncrypt(userKey.key, devicePubKey); + return await this.encryptService.rsaEncrypt(userKey.toEncoded(), devicePubKey); } }