Closed vanitasvitae closed 7 years ago
Thanks for the pro-active update. We are working on some other critical fixes right now, so I am keeping my omemo commit pin back a few to something that is working between ChatSecure iOS and us. Once they switch to the new format OMEMO, we can start keeping up with your latest again!
@n8fr8 I pushed the branch omemo-legacy which is up to date and supports reading the legacy key format. I hope that comes in handy for you until your clients are updated ;)
Again there has been a major change in the API. The OmemoStore implementations are now Singletons, so there is only one instance of them. The OmemoManager only comes in touch with the so called OmemoStoreConnector, which has basically the same methods, but tells the OmemoStore, which Manager is calling the methods. The changes are documented in the omemo.md, so thats a good starting point ;)
Edit: I also updated the legacy branch with these changes :)
Thanks for the update. I'll be getting back to an OMEMO focus late next week.
The OmemoStoreConnector has been removed again. There is still a single OmemoStore instance though :)
The FIleBasedOmemoStore has been reimplemented and will be incompatible with older saved keys.
I just changed the OmemoManager.encrypt() method to expect a String instead of a Message object. This should prevent accidental information loss etc.
@n8fr8 btw: Zom works quite well for me :)
There are some more convenience methods in the OmemoManager and fingerprints are now no longer Strings, but won CharSequence subclasses.
smack-omemo is now merged into Smack master, so there will be no more API changes.
@n8fr8 I just made some changes to the API. Beginning with https://github.com/vanitasvitae/smack-omemo/commit/14013a74aae6c21c4e2ada12ab2f74323dcf3790 one OmemoService can handle multiple OmemoManagers/Devices. That enables you to have multiple devices active on the same XMPPConnection (useful for eg. testing).
This results in a slightly different setup. First, the client has to take care of the deviceId, since the OmemoStore doesn't do that any longer (store it eg. in androids shared preferences). Second, OmemoManagers.getInstanceFor() now takes two arguments, first the Connection and second the id of either an existing device, or null if you want to create a new device.
In short, you should have the following composition now:
I hope, I did not miss anything important. I also updated the documentation. If you have any questions, don't hesitate to ask :) Since the API is likely undergoing some more changes until it is merged, I'll leave this one open for now to document the development :)