1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

build: remove support for old libsignal

Remove support for libsignal-protocol-c < 2.3.2.
Debian 10 uses 2.3.2, Debian 11 and 12 use 2.3.3.
openSUSE from 15.2 onward uses 2.3.3.
Fedora since 28 uses 2.3.2.

We should be good.
This commit is contained in:
Michael Vetter 2022-02-17 20:57:52 +01:00
parent 1856c1e7fc
commit 3f8720d70f
3 changed files with 1 additions and 28 deletions

View File

@ -324,14 +324,7 @@ if test "x$enable_omemo" != xno; then
AM_CONDITIONAL([BUILD_OMEMO], [true]) AM_CONDITIONAL([BUILD_OMEMO], [true])
PKG_CHECK_MODULES([libsignal], [libsignal-protocol-c >= 2.3.2], PKG_CHECK_MODULES([libsignal], [libsignal-protocol-c >= 2.3.2],
[LIBS="-lsignal-protocol-c $LIBS"], [LIBS="-lsignal-protocol-c $LIBS"],
[AC_MSG_NOTICE([libsignal >= 2.3.2 not found, checking for libsignal 2.3.x...]) [AC_MSG_NOTICE([libsignal-protocol-c >= 2.3.2 not found, OMEMO support not enabled])])
PKG_CHECK_MODULES([libsignal], [libsignal-protocol-c >= 2.3.0],
[LIBS="-lsignal-protocol-c $LIBS"
AC_DEFINE([HAVE_LIBSIGNAL_LT_2_3_2], [1], [Have libsignal-protocol-c < 2.3.2])],
[AM_CONDITIONAL([BUILD_OMEMO], [false])
AS_IF([test "x$enable_omemo" = xyes],
[AC_MSG_ERROR([libsignal-protocol-c is required for OMEMO support])],
[AC_MSG_NOTICE([libsignal-protocol-c not found, OMEMO support not enabled])])])])
AC_CHECK_LIB([gcrypt], [gcry_md_extract], AC_CHECK_LIB([gcrypt], [gcry_md_extract],
[LIBS="-lgcrypt $LIBS"], [LIBS="-lgcrypt $LIBS"],

View File

@ -68,15 +68,9 @@ identity_key_store_new(identity_key_store_t* identity_key_store)
identity_key_store->public = NULL; identity_key_store->public = NULL;
} }
#ifdef HAVE_LIBSIGNAL_LT_2_3_2
int
load_session(signal_buffer** record, const signal_protocol_address* address,
void* user_data)
#else
int int
load_session(signal_buffer** record, signal_buffer** user_record, load_session(signal_buffer** record, signal_buffer** user_record,
const signal_protocol_address* address, void* user_data) const signal_protocol_address* address, void* user_data)
#endif
{ {
GHashTable* session_store = (GHashTable*)user_data; GHashTable* session_store = (GHashTable*)user_data;
GHashTable* device_store = NULL; GHashTable* device_store = NULL;
@ -124,17 +118,11 @@ get_sub_device_sessions(signal_int_list** sessions, const char* name,
return SG_SUCCESS; return SG_SUCCESS;
} }
#ifdef HAVE_LIBSIGNAL_LT_2_3_2
int
store_session(const signal_protocol_address* address, uint8_t* record,
size_t record_len, void* user_data)
#else
int int
store_session(const signal_protocol_address* address, store_session(const signal_protocol_address* address,
uint8_t* record, size_t record_len, uint8_t* record, size_t record_len,
uint8_t* user_record, size_t user_record_len, uint8_t* user_record, size_t user_record_len,
void* user_data) void* user_data)
#endif
{ {
GHashTable* session_store = (GHashTable*)user_data; GHashTable* session_store = (GHashTable*)user_data;
GHashTable* device_store = NULL; GHashTable* device_store = NULL;

View File

@ -68,11 +68,7 @@ void identity_key_store_new(identity_key_store_t* identity_key_store);
* @param address the address of the remote client * @param address the address of the remote client
* @return 1 if the session was loaded, 0 if the session was not found, negative on failure * @return 1 if the session was loaded, 0 if the session was not found, negative on failure
*/ */
#ifdef HAVE_LIBSIGNAL_LT_2_3_2
int load_session(signal_buffer** record, const signal_protocol_address* address, void* user_data);
#else
int load_session(signal_buffer** record, signal_buffer** user_record, const signal_protocol_address* address, void* user_data); int load_session(signal_buffer** record, signal_buffer** user_record, const signal_protocol_address* address, void* user_data);
#endif
/** /**
* Returns all known devices with active sessions for a recipient * Returns all known devices with active sessions for a recipient
@ -94,11 +90,7 @@ int get_sub_device_sessions(signal_int_list** sessions, const char* name, size_t
* @param record_len length of the serialized session record * @param record_len length of the serialized session record
* @return 0 on success, negative on failure * @return 0 on success, negative on failure
*/ */
#ifdef HAVE_LIBSIGNAL_LT_2_3_2
int store_session(const signal_protocol_address* address, uint8_t* record, size_t record_len, void* user_data);
#else
int store_session(const signal_protocol_address* address, uint8_t* record, size_t record_len, uint8_t* user_record, size_t user_record_len, void* user_data); int store_session(const signal_protocol_address* address, uint8_t* record, size_t record_len, uint8_t* user_record, size_t user_record_len, void* user_data);
#endif
/** /**
* Determine whether there is a committed session record for a * Determine whether there is a committed session record for a