libomemo
libomemo copied to clipboard
Handle KeyTransport message correctly
Handle KeyTransport message correctly
omemo_message_export_encrypted() should not return early if only its payload is absent.
omemo_message_prepare_encryption() should be able to accept an outgoing_message without body, which would become a template of a KeyTransport message.
hi @root-hardenedvault, thank you for your contribution!
- you're probably right, the shortcut in
omemo_message_export_encrypted()is wrong and it should not exit on an empty payload, as this should result in a key transport message. - i don't think this is true for
omemo_message_prepare_encryption()however, as it is intended to be used on existing, intercepted messages. it is simply a different entry point. for creating a fresh, empty message, which will ever only be done by the application code,omemo_message_create()is to be used. - the last commit is not related to the rest of the PR, i think, its contents seem to refer to the newest version of the standard, which uses a different namespace. this library so far only tries to work with the old version outlined in versoin 0.3.0 of the standard: https://xmpp.org/extensions/attic/xep-0384-0.3.0.html
But how to compose a valid KeyTransport message from omemo_message_create()? as stated in:
https://github.com/gkdr/lurch/pull/162
@gkdr: Any news on it?