summaryrefslogtreecommitdiff
path: root/libs/libaxolotl/src/session_builder_internal.h
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-02-13 07:56:33 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-02-13 09:09:08 +0300
commit193f645f65ad4ffdec3186e4176b23af10861199 (patch)
treee1b16b48ac74c5f03f99a98798e849f6dd9752cc /libs/libaxolotl/src/session_builder_internal.h
parent36c32a13878d3bd94e88bd9c764f1eadb05ea1ed (diff)
libs:
libaxolotl: updated libaxolotl (libsignal-c) from (https://github.com/WhisperSystems/libsignal-protocol-c)
Diffstat (limited to 'libs/libaxolotl/src/session_builder_internal.h')
-rw-r--r--libs/libaxolotl/src/session_builder_internal.h26
1 files changed, 26 insertions, 0 deletions
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 <stdint.h>
+#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 */