diff --git a/jslib b/jslib index 5ba1416679..1f83c3c1ba 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 5ba1416679f112e42e4b5dbd5c47949dcd8d0b56 +Subproject commit 1f83c3c1ba14d2cdbc319ac060a08cc7c0911b5c diff --git a/src/app/services.module.ts b/src/app/services.module.ts index 0aa8d0dee9..bda7379558 100644 --- a/src/app/services.module.ts +++ b/src/app/services.module.ts @@ -29,7 +29,6 @@ import { CipherService } from 'jslib-common/services/cipher.service'; import { CollectionService } from 'jslib-common/services/collection.service'; import { ConstantsService } from 'jslib-common/services/constants.service'; import { ContainerService } from 'jslib-common/services/container.service'; -import { CryptoService } from 'jslib-common/services/crypto.service'; import { EnvironmentService } from 'jslib-common/services/environment.service'; import { EventService } from 'jslib-common/services/event.service'; import { ExportService } from 'jslib-common/services/export.service'; @@ -51,6 +50,8 @@ import { UserService } from 'jslib-common/services/user.service'; import { VaultTimeoutService } from 'jslib-common/services/vaultTimeout.service'; import { WebCryptoFunctionService } from 'jslib-common/services/webCryptoFunction.service'; +import { ElectronCryptoService } from 'jslib-electron/services/electronCrypto.service'; + import { ApiService as ApiServiceAbstraction } from 'jslib-common/abstractions/api.service'; import { AuditService as AuditServiceAbstraction } from 'jslib-common/abstractions/audit.service'; import { AuthService as AuthServiceAbstraction } from 'jslib-common/abstractions/auth.service'; @@ -96,7 +97,7 @@ const platformUtilsService = new ElectronPlatformUtilsService(i18nService, messa const secureStorageService: StorageServiceAbstraction = new ElectronRendererSecureStorageService(); const cryptoFunctionService: CryptoFunctionServiceAbstraction = new WebCryptoFunctionService(window, platformUtilsService); -const cryptoService = new CryptoService(storageService, secureStorageService, cryptoFunctionService, +const cryptoService = new ElectronCryptoService(storageService, secureStorageService, cryptoFunctionService, platformUtilsService, logService); const tokenService = new TokenService(storageService); const appIdService = new AppIdService(storageService); diff --git a/src/services/nativeMessaging.service.ts b/src/services/nativeMessaging.service.ts index b63f5695da..117c1be67c 100644 --- a/src/services/nativeMessaging.service.ts +++ b/src/services/nativeMessaging.service.ts @@ -102,7 +102,7 @@ export class NativeMessagingService { }); } - const keyB64 = await (await this.cryptoService.getKey('biometric')).keyB64; + const keyB64 = await (await this.cryptoService.getKeyFromStorage('biometric')).keyB64; if (keyB64 != null) { this.send({ command: 'biometricUnlock', response: 'unlocked', keyB64: keyB64 }, appId);