Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Remove unused pending key exchange #95

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

christophhagen
Copy link
Contributor

session_state structs include a pending_key_exchange variable, which (in my humble opinion) is unused and can be removed. Here is my reasoning:

  • It is only used within session_state.c inside functions for serialization and deserialization, and the data is never modified or read.
  • The data is never accessed from any code in libsignal-protocol-c.
  • While the data within pending_key_exchange is accessible through several functions in the session_state.h header, this header is not included in signal-protocol.h, which is the main way for any program to interact with the code.
  • There are no tests that use pending_key_exchange, except for consistency checks of session_state, where it is manually set.

So correct me if I'm wrong, but it looks like pending_key_echange is legacy code that is no longer useful and can be removed.

Christoph Hagen added 3 commits October 8, 2017 02:31
session_pending_key_exchange is never used inside session_state.c or anywhere else, and while it is exposed via session_state.h, it is not included in signal_protocol.h
@dkonigsberg
Copy link
Contributor

While your assessment of the usage of pending_key_exchange is likely correct, it still remains within the libsignal-protocol-java library that this library attempts to track. As such, I'll leave this on-hold until such a time as this field is removed from that library as well.

@christophhagen christophhagen deleted the remove-pending-key-exchange branch March 1, 2018 18:30
@christophhagen christophhagen restored the remove-pending-key-exchange branch March 1, 2018 19:02
@christophhagen christophhagen reopened this Mar 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants