Now, this is a story all about how
Certificates work in Android town
And I'd like to take a minute
Enter, close the door
I'll tell you how I've figured out the inner workings of the Keystore
Well it all boils down the fact that Google got scared
It said, "You're certs are movin' to a place you won't find".
So the directory, user certificates are stored, is hard to find, and possibly
not readable by your application[1]. Instead, we need to use the Keystore[2]
API, specifically we'll need to open the `AndroidCAStore` Keystore type.
The various Keystore types are supposedly documented[3], but I'm failing to
find a logical path that would lead you to conclude that:
a) System certificates can or should be accessed using the Keystore,
specifically the AndroidCAStore type
b) User certificates can be found in the same Keystore type as the system
certificates
So this was mostly found using random googling, swearing, and a couple of
educated guesses.
[1]: https://android-developers.googleblog.com/2016/07/changes-to-trusted-certificate.html
[2]: https://developer.android.com/reference/java/security/KeyStore
[3]: https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html#keystore-types
This should help us to track down UTD sources, it ensures that we log
the state of a Olm session when we try to decrypt an `m.olm.*` to-device
message.
* Fix crash about several DataStores using the same file
- Create `@SessionCoroutineScope` annotation to pass a session-managed coroutine scope to the DI.
- Expose this scope from `MatrixClient`.
- Rework DataStore file creation a bit.
- Centralise session preference creation through `DefaultSessionPreferencesStoreFactory` until we figure out what went wrong with the scoping
* Add 'send private read receipts' option in advanced settings
* Create `SessionPreferencesStore` that stores the settings for the current use separate from those of the app.
* Rename `PreferencesStore` to `AppPreferencesStore` to split the preferences.
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
* Use cached users from the Rust SDK.
Also lazy load received users by batches.
* Create `RoomMemberListFetcher` to wrap all the room member loading logic
* Ensure we clear `RoomMember` Rust references if the fetching coroutine is canceled