mirror of
https://github.com/bitwarden/mobile
synced 2025-12-14 23:33:34 +00:00
fallback to "old" KeyStoreStorageService
This commit is contained in:
@@ -207,10 +207,23 @@ namespace Bit.Android
|
||||
container.RegisterSingleton(application.ApplicationContext);
|
||||
container.RegisterSingleton<Application>(application);
|
||||
|
||||
// Secure Storage
|
||||
ISecureStorageService secureStorage;
|
||||
try
|
||||
{
|
||||
secureStorage = new KeyStoreBackedStorageService(CrossSettings.Current);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Some isolated devices are having a hard time generating RSA keys for key store.
|
||||
// Continue using the "old" keystore implementation for now.
|
||||
secureStorage = new KeyStoreStorageService(new char[] { });
|
||||
}
|
||||
|
||||
// Services
|
||||
container.RegisterSingleton<IDatabaseService, DatabaseService>();
|
||||
container.RegisterSingleton<ISqlService, SqlService>();
|
||||
container.RegisterSingleton<ISecureStorageService, KeyStoreBackedStorageService>();
|
||||
container.RegisterSingleton(secureStorage);
|
||||
container.RegisterSingleton<ICryptoService, CryptoService>();
|
||||
container.RegisterSingleton<IKeyDerivationService, BouncyCastleKeyDerivationService>();
|
||||
container.RegisterSingleton<IAuthService, AuthService>();
|
||||
|
||||
Reference in New Issue
Block a user