From 193f645f65ad4ffdec3186e4176b23af10861199 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 13 Feb 2017 07:56:33 +0300 Subject: libs: libaxolotl: updated libaxolotl (libsignal-c) from (https://github.com/WhisperSystems/libsignal-protocol-c) --- libs/libaxolotl/src/session_builder_internal.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libs/libaxolotl/src/session_builder_internal.h (limited to 'libs/libaxolotl/src/session_builder_internal.h') diff --git a/libs/libaxolotl/src/session_builder_internal.h b/libs/libaxolotl/src/session_builder_internal.h new file mode 100644 index 0000000000..2bf8dba4e0 --- /dev/null +++ b/libs/libaxolotl/src/session_builder_internal.h @@ -0,0 +1,26 @@ +#ifndef SESSION_BUILDER_INTERNAL_H +#define SESSION_BUILDER_INTERNAL_H + +#include +#include "signal_protocol_types.h" + +/** + * Build a new session from a received pre_key_signal_message. + * + * After a session is constructed in this way, the embedded signal_message + * can be decrypted. + * + * @param message The received pre_key_signal_message. + * @param unsigned_pre_key_id set to the unsigned pre key ID, if available. + * Return value indicates whether or not this value is available. + * @retval 0 Success, no unsigned pre key value available + * @retval 1 Success, an unsigned pre key is available + * @retval SG_ERR_INVALID_KEY_ID when there is no local pre_key_record that + * corresponds to the PreKey ID in the message. + * @retval SG_ERR_INVALID_KEY when the message is formatted incorrectly. + * @retval SG_ERR_UNTRUSTED_IDENTITY when the identity key of the sender is untrusted. + */ +int session_builder_process_pre_key_signal_message(session_builder *builder, + session_record *record, pre_key_signal_message *message, uint32_t *unsigned_pre_key_id); + +#endif /* SESSION_BUILDER_INTERNAL_H */ -- cgit v1.2.3