Skip to content

Commit abad163

Browse files
authored
Update libsignal to v0.86.6 (#382)
Also replace derivative (unmaintained) by derive_more
1 parent 2ce7ec7 commit abad163

File tree

5 files changed

+22
-34
lines changed

5 files changed

+22
-34
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ license = "AGPL-3.0-only"
77
readme = "README.md"
88

99
[dependencies]
10-
libsignal-protocol = { git = "https://github.com/signalapp/libsignal", tag = "v0.83.0" }
11-
libsignal-core = { git = "https://github.com/signalapp/libsignal", tag = "v0.83.0" }
12-
zkgroup = { git = "https://github.com/signalapp/libsignal", tag = "v0.83.0" }
10+
libsignal-protocol = { git = "https://github.com/signalapp/libsignal", tag = "v0.86.6" }
11+
libsignal-core = { git = "https://github.com/signalapp/libsignal", tag = "v0.86.6" }
12+
zkgroup = { git = "https://github.com/signalapp/libsignal", tag = "v0.86.6" }
1313

1414
aes = "0.8"
1515
aes-gcm = "0.10"
@@ -20,7 +20,7 @@ base64 = "0.22"
2020
bincode = "1.3"
2121
bytes = "1"
2222
chrono = { version = "0.4", features = ["serde", "clock"], default-features = false }
23-
derivative = "2.2"
23+
derive_more = { version = "2.1", features = ["debug"] }
2424
futures = "0.3"
2525
hex = "0.4"
2626
hkdf = "0.12"

src/groups_v2/model.rs

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::{convert::TryFrom, convert::TryInto};
22

3-
use derivative::Derivative;
43
use libsignal_protocol::{Aci, Pni, ServiceId};
54
use serde::{Deserialize, Serialize};
65
use zkgroup::profiles::ProfileKey;
@@ -16,13 +15,12 @@ pub enum Role {
1615
Administrator,
1716
}
1817

19-
#[derive(Derivative, Clone, Deserialize, Serialize)]
20-
#[derivative(Debug)]
18+
#[derive(derive_more::Debug, Clone, Deserialize, Serialize)]
2119
pub struct Member {
2220
#[serde(with = "aci_serde")]
2321
pub aci: Aci,
2422
pub role: Role,
25-
#[derivative(Debug = "ignore")]
23+
#[debug(ignore)]
2624
pub profile_key: ProfileKey,
2725
pub joined_at_revision: u32,
2826
}
@@ -66,11 +64,10 @@ pub struct PendingMember {
6664
pub timestamp: u64,
6765
}
6866

69-
#[derive(Derivative, Clone)]
70-
#[derivative(Debug)]
67+
#[derive(derive_more::Debug, Clone)]
7168
pub struct RequestingMember {
7269
pub aci: Aci,
73-
#[derivative(Debug = "ignore")]
70+
#[debug(ignore)]
7471
pub profile_key: ProfileKey,
7572
pub timestamp: u64,
7673
}
@@ -81,8 +78,7 @@ impl PartialEq for RequestingMember {
8178
}
8279
}
8380

84-
#[derive(Derivative, Clone)]
85-
#[derivative(Debug)]
81+
#[derive(Debug, Clone)]
8682
pub struct BannedMember {
8783
pub service_id: ServiceId,
8884
pub timestamp: u64,
@@ -94,12 +90,11 @@ impl PartialEq for BannedMember {
9490
}
9591
}
9692

97-
#[derive(Derivative, Clone)]
98-
#[derivative(Debug)]
93+
#[derive(derive_more::Debug, Clone)]
9994
pub struct PromotedMember {
10095
pub aci: Aci,
10196
pub pni: Pni,
102-
#[derivative(Debug = "ignore")]
97+
#[debug(ignore)]
10398
pub profile_key: ProfileKey,
10499
}
105100

@@ -150,8 +145,7 @@ pub struct GroupChanges {
150145
pub change_epoch: u32,
151146
}
152147

153-
#[derive(Derivative, Clone)]
154-
#[derivative(Debug)]
148+
#[derive(derive_more::Debug, Clone)]
155149
pub enum GroupChange {
156150
NewMember(Member),
157151
DeleteMember(Aci),
@@ -161,14 +155,14 @@ pub enum GroupChange {
161155
},
162156
ModifyMemberProfileKey {
163157
aci: Aci,
164-
#[derivative(Debug = "ignore")]
158+
#[debug(ignore)]
165159
profile_key: ProfileKey,
166160
},
167161
NewPendingMember(PendingMember),
168162
DeletePendingMember(ServiceId),
169163
PromotePendingMember {
170164
address: ServiceId,
171-
#[derivative(Debug = "ignore")]
165+
#[debug(ignore)]
172166
profile_key: ProfileKey,
173167
},
174168
Title(String),

src/provisioning/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use std::convert::TryInto;
77
pub use cipher::ProvisioningCipher;
88

99
use base64::Engine;
10-
use derivative::Derivative;
1110
use futures::StreamExt;
1211
use futures::{channel::mpsc::Sender, pin_mut, SinkExt};
1312
use libsignal_core::curve::CurveError;
@@ -129,21 +128,20 @@ pub enum SecondaryDeviceProvisioning {
129128
NewDeviceRegistration(NewDeviceRegistration),
130129
}
131130

132-
#[derive(Derivative)]
133-
#[derivative(Debug)]
131+
#[derive(derive_more::Debug)]
134132
pub struct NewDeviceRegistration {
135133
pub phone_number: phonenumber::PhoneNumber,
136134
pub device_id: DeviceId,
137135
pub registration_id: u32,
138136
pub pni_registration_id: u32,
139137
pub service_ids: ServiceIds,
140-
#[derivative(Debug = "ignore")]
138+
#[debug(ignore)]
141139
pub aci_private_key: PrivateKey,
142140
pub aci_public_key: IdentityKey,
143-
#[derivative(Debug = "ignore")]
141+
#[debug(ignore)]
144142
pub pni_private_key: PrivateKey,
145143
pub pni_public_key: IdentityKey,
146-
#[derivative(Debug = "ignore")]
144+
#[debug(ignore)]
147145
pub profile_key: ProfileKey,
148146
}
149147

src/push_service/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use crate::{
88
websocket::SignalWebSocket,
99
};
1010

11-
use derivative::Derivative;
1211
use libsignal_protocol::{
1312
error::SignalProtocolError,
1413
kem::{Key, Public},
@@ -49,11 +48,10 @@ pub struct ProofRequired {
4948
pub options: Vec<String>,
5049
}
5150

52-
#[derive(Derivative, Clone, Serialize, Deserialize)]
53-
#[derivative(Debug)]
51+
#[derive(derive_more::Debug, Clone, Serialize, Deserialize)]
5452
pub struct HttpAuth {
5553
pub username: String,
56-
#[derivative(Debug = "ignore")]
54+
#[debug(ignore)]
5755
pub password: String,
5856
}
5957

src/push_service/registration.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use derivative::Derivative;
21
use libsignal_protocol::IdentityKey;
32
use reqwest::Method;
43
use serde::{Deserialize, Serialize};
@@ -14,11 +13,10 @@ use crate::{
1413

1514
/// This type is used in registration lock handling.
1615
/// It's identical with HttpAuth, but used to avoid type confusion.
17-
#[derive(Derivative, Clone, Serialize, Deserialize)]
18-
#[derivative(Debug)]
16+
#[derive(derive_more::Debug, Clone, Serialize, Deserialize)]
1917
pub struct AuthCredentials {
2018
pub username: String,
21-
#[derivative(Debug = "ignore")]
19+
#[debug(ignore)]
2220
pub password: String,
2321
}
2422

0 commit comments

Comments
 (0)