From 3cd45b0ea6aa15b7a742faee79ee598fff6881e6 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 13 Feb 2026 14:20:55 +0100 Subject: [PATCH] Fix build --- .../src/user-key-rotation.service.abstraction.ts | 6 +++--- .../src/user-key-rotation.service.ts | 14 +++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/libs/user-crypto-management/src/user-key-rotation.service.abstraction.ts b/libs/user-crypto-management/src/user-key-rotation.service.abstraction.ts index 9045a757553..b7780b18d5d 100644 --- a/libs/user-crypto-management/src/user-key-rotation.service.abstraction.ts +++ b/libs/user-crypto-management/src/user-key-rotation.service.abstraction.ts @@ -1,12 +1,12 @@ -import { AsymmetricPublicCryptoKey, UserId } from "@bitwarden/sdk-internal"; +import { PublicKey, UserId } from "@bitwarden/sdk-internal"; /** * Result of the trust verification process. */ export type TrustVerificationResult = { wasTrustDenied: boolean; - trustedOrganizationPublicKeys: AsymmetricPublicCryptoKey[]; - trustedEmergencyAccessUserPublicKeys: AsymmetricPublicCryptoKey[]; + trustedOrganizationPublicKeys: PublicKey[]; + trustedEmergencyAccessUserPublicKeys: PublicKey[]; }; /** diff --git a/libs/user-crypto-management/src/user-key-rotation.service.ts b/libs/user-crypto-management/src/user-key-rotation.service.ts index acb56b5de9f..e7f817ecf93 100644 --- a/libs/user-crypto-management/src/user-key-rotation.service.ts +++ b/libs/user-crypto-management/src/user-key-rotation.service.ts @@ -25,7 +25,7 @@ export class DefaultUserKeyRotationService implements UserKeyRotationService { private sdkService: SdkService, private logService: LogService, private dialogService: DialogService, - ) {} + ) { } async changePasswordAndRotateUserKey( currentMasterPassword: string, @@ -51,10 +51,14 @@ export class DefaultUserKeyRotationService implements UserKeyRotationService { using ref = sdk.take(); this.logService.info("[UserKey Rotation] Re-encrypting user data with new user key..."); - await ref.value.user_crypto_management().rotate_user_keys_with_password_change({ - old_password: currentMasterPassword, - password: newMasterPassword, - hint, + await ref.value.user_crypto_management().rotate_user_keys({ + master_key_unlock_method: { + Password: { + old_password: currentMasterPassword, + password: newMasterPassword, + hint: hint, + } + }, trusted_emergency_access_public_keys: trustedEmergencyAccessUserPublicKeys, trusted_organization_public_keys: trustedOrganizationPublicKeys, } as RotateUserKeysRequest);