Bump libsignal-protocol-c dependency to 2.3.2
This commit is contained in:
parent
4c8f4bef66
commit
7012023d59
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,4 +1,4 @@
|
||||||
[submodule "libsignal-protocol-c"]
|
[submodule "libsignal-protocol-c"]
|
||||||
path = plugins/signal-protocol/libsignal-protocol-c
|
path = plugins/signal-protocol/libsignal-protocol-c
|
||||||
url = https://github.com/WhisperSystems/libsignal-protocol-c.git
|
url = https://github.com/WhisperSystems/libsignal-protocol-c.git
|
||||||
branch = e59089a644ca747ed50442eb8804266618f11c0b
|
branch = v2.3.2
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit e59089a644ca747ed50442eb8804266618f11c0b
|
Subproject commit 4a137eaf4eb4421949e2e1dde9f11ec7bc07b88f
|
|
@ -142,21 +142,22 @@ public class Store : Object {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ss_load_session_func(out Buffer? buffer, Address address, void* user_data) {
|
static int ss_load_session_func(out Buffer? record, out Buffer? user_record, Address address, void* user_data) {
|
||||||
Store store = (Store) user_data;
|
Store store = (Store) user_data;
|
||||||
uint8[]? res = null;
|
uint8[]? res = null;
|
||||||
try {
|
try {
|
||||||
res = store.session_store.load_session(address);
|
res = store.session_store.load_session(address);
|
||||||
} catch (Error e) {
|
} catch (Error e) {
|
||||||
buffer = null;
|
record = null;
|
||||||
return e.code;
|
return e.code;
|
||||||
}
|
}
|
||||||
if (res == null) {
|
if (res == null) {
|
||||||
buffer = null;
|
record = null;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
buffer = new Buffer.from((!)res);
|
record = new Buffer.from((!)res);
|
||||||
if (buffer == null) return ErrorCode.NOMEM;
|
user_record = null; // No support for user_record
|
||||||
|
if (record == null) return ErrorCode.NOMEM;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +172,8 @@ public class Store : Object {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ss_store_session_func(Address address, uint8[] record, void* user_data) {
|
static int ss_store_session_func(Address address, uint8[] record, uint8[] user_record, void* user_data) {
|
||||||
|
// Ignoring user_record
|
||||||
Store store = (Store) user_data;
|
Store store = (Store) user_data;
|
||||||
return catch_to_code(() => {
|
return catch_to_code(() => {
|
||||||
store.session_store.store_session(address, record);
|
store.session_store.store_session(address, record);
|
||||||
|
|
|
@ -62,11 +62,11 @@ namespace Signal {
|
||||||
public void* user_data;
|
public void* user_data;
|
||||||
}
|
}
|
||||||
[CCode (has_target = false)]
|
[CCode (has_target = false)]
|
||||||
public delegate int LoadSessionFunc(out Buffer buffer, Address address, void* user_data);
|
public delegate int LoadSessionFunc(out Buffer record, out Buffer user_record, Address address, void* user_data);
|
||||||
[CCode (has_target = false)]
|
[CCode (has_target = false)]
|
||||||
public delegate int GetSubDeviceSessionsFunc(out IntList sessions, char[] name, void* user_data);
|
public delegate int GetSubDeviceSessionsFunc(out IntList sessions, char[] name, void* user_data);
|
||||||
[CCode (has_target = false)]
|
[CCode (has_target = false)]
|
||||||
public delegate int StoreSessionFunc(Address address, uint8[] record, void* user_data);
|
public delegate int StoreSessionFunc(Address address, uint8[] record, uint8[] user_record, void* user_data);
|
||||||
[CCode (has_target = false)]
|
[CCode (has_target = false)]
|
||||||
public delegate int ContainsSessionFunc(Address address, void* user_data);
|
public delegate int ContainsSessionFunc(Address address, void* user_data);
|
||||||
[CCode (has_target = false)]
|
[CCode (has_target = false)]
|
||||||
|
@ -134,9 +134,9 @@ namespace Signal {
|
||||||
void* user_data;
|
void* user_data;
|
||||||
}
|
}
|
||||||
[CCode (has_target = false)]
|
[CCode (has_target = false)]
|
||||||
public delegate int StoreSenderKeyFunc(SenderKeyName sender_key_name, uint8[] record, void* user_data);
|
public delegate int StoreSenderKeyFunc(SenderKeyName sender_key_name, uint8[] record, uint8[] user_record, void* user_data);
|
||||||
[CCode (has_target = false)]
|
[CCode (has_target = false)]
|
||||||
public delegate int LoadSenderKeyFunc(out Buffer record, SenderKeyName sender_key_name, void* user_data);
|
public delegate int LoadSenderKeyFunc(out Buffer record, out Buffer user_record, SenderKeyName sender_key_name, void* user_data);
|
||||||
|
|
||||||
[CCode (has_target = false)]
|
[CCode (has_target = false)]
|
||||||
public delegate int DestroyFunc(void* user_data);
|
public delegate int DestroyFunc(void* user_data);
|
||||||
|
|
|
@ -137,6 +137,7 @@ namespace Signal {
|
||||||
[CCode (cname = "session_record", cprefix = "session_record_", cheader_filename = "signal/signal_protocol_types.h")]
|
[CCode (cname = "session_record", cprefix = "session_record_", cheader_filename = "signal/signal_protocol_types.h")]
|
||||||
public class SessionRecord : TypeBase {
|
public class SessionRecord : TypeBase {
|
||||||
public SessionState state { get; }
|
public SessionState state { get; }
|
||||||
|
public Buffer user_record { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Compact]
|
[Compact]
|
||||||
|
|
Loading…
Reference in a new issue