Open root-hardenedvault opened 3 years ago
hi @root-hardenedvault, thank you for your contribution!
omemo_message_export_encrypted()
is wrong and it should not exit on an empty payload, as this should result in a key transport message.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.But how to compose a valid KeyTransport message from omemo_message_create()? as stated in:
@gkdr: Any news on it?
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.