Skip to content

Commit

Permalink
upgrade libsignal to v0.51.0 (whisperfish#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
boxdot authored Jun 25, 2024
1 parent 5bf74db commit f93f2de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions presage-store-sled/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ mod tests {
use presage::{
libsignal_service::protocol::{
self, Direction, GenericSignedPreKey, IdentityKeyStore, PreKeyRecord, PreKeyStore,
SessionRecord, SessionStore, SignedPreKeyRecord, SignedPreKeyStore,
SessionRecord, SessionStore, SignedPreKeyRecord, SignedPreKeyStore, Timestamp,
},
store::Store,
};
Expand Down Expand Up @@ -746,7 +746,12 @@ mod tests {
) -> bool {
let mut db = SledStore::temporary().unwrap().aci_protocol_store();
let id = id.into();
let signed_pre_key_record = SignedPreKeyRecord::new(id, timestamp, &key_pair.0, &signature);
let signed_pre_key_record = SignedPreKeyRecord::new(
id,
Timestamp::from_epoch_millis(timestamp),
&key_pair.0,
&signature,
);
db.save_signed_pre_key(id, &signed_pre_key_record)
.await
.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions presage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ edition = "2021"
license = "AGPL-3.0-only"

[dependencies]
libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "1e04a655c62271ffdfe70b053a6150e0cc2cb155" }
libsignal-service-hyper = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "1e04a655c62271ffdfe70b053a6150e0cc2cb155" }
libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "5a496fd" }
libsignal-service-hyper = { git = "https://github.com/whisperfish/libsignal-service-rs", rev = "5a496fd" }

base64 = "0.21"
futures = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion presage/src/manager/registered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ impl<S: Store> Manager<S, Registered> {
.as_secs();

if let Some(expiration) = sender_certificate.and_then(|s| s.expiration().ok()) {
expiration >= seconds_since_epoch - 600
seconds_since_epoch <= expiration.epoch_millis() / 1000 + 600
} else {
true
}
Expand Down

0 comments on commit f93f2de

Please sign in to comment.