mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
fallback to "old" KeyStoreStorageService
This commit is contained in:
parent
6ddc7fa4cc
commit
aff1cc1cc3
1 changed files with 14 additions and 1 deletions
|
@ -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>();
|
||||
|
|
Loading…
Reference in a new issue