aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/olm/error.h8
-rw-r--r--include/olm/inbound_group_session.h8
-rw-r--r--include/olm/message.h8
3 files changed, 14 insertions, 10 deletions
diff --git a/include/olm/error.h b/include/olm/error.h
index 3f74992..98d2cf5 100644
--- a/include/olm/error.h
+++ b/include/olm/error.h
@@ -32,8 +32,12 @@ enum OlmErrorCode {
OLM_UNKNOWN_PICKLE_VERSION = 9, /*!< The pickled object is too new */
OLM_CORRUPTED_PICKLE = 10, /*!< The pickled object couldn't be decoded */
- OLM_BAD_RATCHET_KEY = 11,
- OLM_BAD_CHAIN_INDEX = 12,
+ OLM_BAD_SESSION_KEY = 11, /*!< Attempt to initialise an inbound group
+ session from an invalid session key */
+ OLM_UNKNOWN_MESSAGE_INDEX = 12, /*!< Attempt to decode a message whose
+ * index is earlier than our earliest
+ * known session key.
+ */
/* remember to update the list of string constants in error.c when updating
* this list. */
diff --git a/include/olm/inbound_group_session.h b/include/olm/inbound_group_session.h
index 4cf4ac4..e24f377 100644
--- a/include/olm/inbound_group_session.h
+++ b/include/olm/inbound_group_session.h
@@ -91,7 +91,7 @@ size_t olm_unpickle_inbound_group_session(
* error code. The last_error will be:
*
* * OLM_INVALID_BASE64 if the session_key is not valid base64
- * * OLM_BAD_RATCHET_KEY if the session_key is invalid
+ * * OLM_BAD_SESSION_KEY if the session_key is invalid
*/
size_t olm_init_inbound_group_session(
OlmInboundGroupSession *session,
@@ -129,9 +129,9 @@ size_t olm_group_decrypt_max_plaintext_length(
* * OLM_BAD_MESSAGE_VERSION if the message was encrypted with an unsupported
* version of the protocol
* * OLM_BAD_MESSAGE_FORMAT if the message headers could not be decoded
- * * OLM_BAD_MESSAGE_MAC if the message could not be verified
- * * OLM_BAD_CHAIN_INDEX if we do not have a ratchet key corresponding to the
- * message's index (ie, it was sent before the ratchet key was shared with
+ * * OLM_BAD_MESSAGE_MAC if the message could not be verified
+ * * OLM_UNKNOWN_MESSAGE_INDEX if we do not have a session key corresponding to the
+ * message's index (ie, it was sent before the session key was shared with
* us)
*/
size_t olm_group_decrypt(
diff --git a/include/olm/message.h b/include/olm/message.h
index bd7aec3..cff15f3 100644
--- a/include/olm/message.h
+++ b/include/olm/message.h
@@ -47,7 +47,7 @@ size_t _olm_encode_group_message_length(
* version: version number of the olm protocol
* session_id: group session identifier
* session_id_length: length of session_id
- * chain_index: message index
+ * message_index: message index
* ciphertext_length: length of the ciphertext
* output: where to write the output. Should be at least
* olm_encode_group_message_length() bytes long.
@@ -58,7 +58,7 @@ void _olm_encode_group_message(
uint8_t version,
const uint8_t *session_id,
size_t session_id_length,
- uint32_t chain_index,
+ uint32_t message_index,
size_t ciphertext_length,
uint8_t *output,
uint8_t **ciphertext_ptr
@@ -69,8 +69,8 @@ struct _OlmDecodeGroupMessageResults {
uint8_t version;
const uint8_t *session_id;
size_t session_id_length;
- uint32_t chain_index;
- int has_chain_index;
+ uint32_t message_index;
+ int has_message_index;
const uint8_t *ciphertext;
size_t ciphertext_length;
};