Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
favor of `ensure_nss_initialized_with_profile_dir`.

### Logins
- `create_login_store_with_nss_keymanager` returns an `ApiResult` now, instead
of just panicking.
- fix `count_by_origin` and `count_by_form_action_origin` with punicode origins

# v146.0 (_2025-11-10_)
Expand Down
8 changes: 5 additions & 3 deletions components/logins/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ pub fn create_managed_encdec(key_manager: Arc<dyn KeyManager>) -> Arc<ManagedEnc
pub fn create_login_store_with_static_key_manager(path: String, key: String) -> Arc<LoginStore> {
let encdec: ManagedEncryptorDecryptor =
ManagedEncryptorDecryptor::new(Arc::new(StaticKeyManager::new(key)));
Arc::new(LoginStore::new(path, Arc::new(encdec)).unwrap())
let store = LoginStore::new(path, Arc::new(encdec)).expect("error setting up LoginStore");
Arc::new(store)
}

// Create a LoginStore with NSSKeyManager by passing in a db path and a PrimaryPasswordAuthenticator.
Expand All @@ -65,9 +66,10 @@ pub fn create_login_store_with_static_key_manager(path: String, key: String) ->
pub fn create_login_store_with_nss_keymanager(
path: String,
primary_password_authenticator: Arc<dyn PrimaryPasswordAuthenticator>,
) -> Arc<LoginStore> {
) -> ApiResult<Arc<LoginStore>> {
let encdec: ManagedEncryptorDecryptor = ManagedEncryptorDecryptor::new(Arc::new(
NSSKeyManager::new(primary_password_authenticator),
));
Arc::new(LoginStore::new(path, Arc::new(encdec)).unwrap())
let store = LoginStore::new(path, Arc::new(encdec))?;
Ok(Arc::new(store))
}