mirror of
https://github.com/bitwarden/browser
synced 2026-02-08 20:50:28 +00:00
Update sdk to build 168
This commit is contained in:
@@ -96,10 +96,8 @@ describe("KeyRotationService", () => {
|
||||
const mockTrustedPublicKeys = [Utils.fromUtf8ToArray("test-public-key")];
|
||||
|
||||
beforeAll(() => {
|
||||
jest.spyOn(PureCrypto, "generate_user_key_aes256_cbc_hmac").mockReturnValue(new Uint8Array(64));
|
||||
jest
|
||||
.spyOn(PureCrypto, "generate_user_key_xchacha20_poly1305")
|
||||
.mockReturnValue(new Uint8Array(70));
|
||||
jest.spyOn(PureCrypto, "make_user_key_aes256_cbc_hmac").mockReturnValue(new Uint8Array(64));
|
||||
jest.spyOn(PureCrypto, "make_user_key_xchacha20_poly1305").mockReturnValue(new Uint8Array(70));
|
||||
jest
|
||||
.spyOn(PureCrypto, "encrypt_user_key_with_master_password")
|
||||
.mockReturnValue("mockNewUserKey");
|
||||
@@ -294,14 +292,14 @@ describe("KeyRotationService", () => {
|
||||
expect(arg.accountUnlockData.emergencyAccessUnlockData.length).toBe(1);
|
||||
expect(arg.accountUnlockData.organizationAccountRecoveryUnlockData.length).toBe(1);
|
||||
expect(arg.accountUnlockData.passkeyUnlockData.length).toBe(2);
|
||||
expect(PureCrypto.generate_user_key_aes256_cbc_hmac).toHaveBeenCalled();
|
||||
expect(PureCrypto.make_user_key_aes256_cbc_hmac).toHaveBeenCalled();
|
||||
expect(PureCrypto.encrypt_user_key_with_master_password).toHaveBeenCalledWith(
|
||||
new Uint8Array(64),
|
||||
"newMasterPassword",
|
||||
mockUser.email,
|
||||
DEFAULT_KDF_CONFIG.toSdkConfig(),
|
||||
);
|
||||
expect(PureCrypto.generate_user_key_xchacha20_poly1305).not.toHaveBeenCalled();
|
||||
expect(PureCrypto.make_user_key_xchacha20_poly1305).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("rotates the userkey to xchacha20poly1305 and encrypted data and changes master password when featureflag is active", async () => {
|
||||
@@ -339,14 +337,14 @@ describe("KeyRotationService", () => {
|
||||
expect(arg.accountUnlockData.emergencyAccessUnlockData.length).toBe(1);
|
||||
expect(arg.accountUnlockData.organizationAccountRecoveryUnlockData.length).toBe(1);
|
||||
expect(arg.accountUnlockData.passkeyUnlockData.length).toBe(2);
|
||||
expect(PureCrypto.generate_user_key_aes256_cbc_hmac).toHaveBeenCalled();
|
||||
expect(PureCrypto.make_user_key_aes256_cbc_hmac).toHaveBeenCalled();
|
||||
expect(PureCrypto.encrypt_user_key_with_master_password).toHaveBeenCalledWith(
|
||||
new Uint8Array(70),
|
||||
"newMasterPassword",
|
||||
mockUser.email,
|
||||
DEFAULT_KDF_CONFIG.toSdkConfig(),
|
||||
);
|
||||
expect(PureCrypto.generate_user_key_xchacha20_poly1305).toHaveBeenCalled();
|
||||
expect(PureCrypto.make_user_key_xchacha20_poly1305).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("returns early when first trust warning dialog is declined", async () => {
|
||||
|
||||
@@ -121,9 +121,9 @@ export class UserKeyRotationService {
|
||||
|
||||
const newMasterKey = await this.keyService.makeMasterKey(newMasterPassword, email, kdfConfig);
|
||||
|
||||
let userKeyBytes = PureCrypto.generate_user_key_aes256_cbc_hmac();
|
||||
let userKeyBytes = PureCrypto.make_user_key_aes256_cbc_hmac();
|
||||
if (await this.configService.getFeatureFlag(FeatureFlag.EnrollAeadOnKeyRotation)) {
|
||||
userKeyBytes = PureCrypto.generate_user_key_xchacha20_poly1305();
|
||||
userKeyBytes = PureCrypto.make_user_key_xchacha20_poly1305();
|
||||
}
|
||||
const newMasterKeyEncryptedUserKey = new EncString(
|
||||
PureCrypto.encrypt_user_key_with_master_password(
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -24,7 +24,7 @@
|
||||
"@angular/platform-browser": "18.2.13",
|
||||
"@angular/platform-browser-dynamic": "18.2.13",
|
||||
"@angular/router": "18.2.13",
|
||||
"@bitwarden/sdk-internal": "0.2.0-main.163",
|
||||
"@bitwarden/sdk-internal": "0.2.0-main.168",
|
||||
"@electron/fuses": "1.8.0",
|
||||
"@emotion/css": "11.13.5",
|
||||
"@koa/multer": "3.0.2",
|
||||
@@ -4771,9 +4771,9 @@
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@bitwarden/sdk-internal": {
|
||||
"version": "0.2.0-main.163",
|
||||
"resolved": "https://registry.npmjs.org/@bitwarden/sdk-internal/-/sdk-internal-0.2.0-main.163.tgz",
|
||||
"integrity": "sha512-k8Z4wUhgQi4+vc/Zy3GgRZqxqrCiEzC0M4dRkoieMSU65e/8b0HBy0kXYcrcip2HKIxFZd6hXsv/auIf7fgEFg==",
|
||||
"version": "0.2.0-main.168",
|
||||
"resolved": "https://registry.npmjs.org/@bitwarden/sdk-internal/-/sdk-internal-0.2.0-main.168.tgz",
|
||||
"integrity": "sha512-NU10oqw+GI9oHrh8/i/IC8/7oaYmswqC2E/0Zc56xC3jY7uNgFZgpae7JhyMU6UxzrAjiEqdmGnm+AGWFiPG8w==",
|
||||
"license": "GPL-3.0"
|
||||
},
|
||||
"node_modules/@bitwarden/send-ui": {
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
"@angular/platform-browser": "18.2.13",
|
||||
"@angular/platform-browser-dynamic": "18.2.13",
|
||||
"@angular/router": "18.2.13",
|
||||
"@bitwarden/sdk-internal": "0.2.0-main.163",
|
||||
"@bitwarden/sdk-internal": "0.2.0-main.168",
|
||||
"@electron/fuses": "1.8.0",
|
||||
"@emotion/css": "11.13.5",
|
||||
"@koa/multer": "3.0.2",
|
||||
|
||||
Reference in New Issue
Block a user