mirror of
https://github.com/signalapp/libsignal.git
synced 2026-04-26 01:35:22 +02:00
protocol: Clean up pending Kyber pre-keys from sessions
This commit is contained in:
@@ -127,6 +127,17 @@ fn test_basic_prekey() -> TestResult {
|
||||
|
||||
let alice_decrypts = decrypt(alice_store, &bob_address, &bob_outgoing).await?;
|
||||
|
||||
{
|
||||
let record_len = alice_store.session_store.load_session(&bob_address).await
|
||||
.expect("can load session")
|
||||
.expect("has session record")
|
||||
.serialize()
|
||||
.expect("can serialize session record")
|
||||
.len();
|
||||
assert!(1024 > record_len, "Unexpectedly large session record ({record_len} bytes). Did you forget to clean things up?")
|
||||
}
|
||||
|
||||
|
||||
assert_eq!(
|
||||
String::from_utf8(alice_decrypts).expect("valid utf8"),
|
||||
bobs_response
|
||||
@@ -1662,7 +1673,7 @@ fn test_simultaneous_initiate_lost_message_repeated_messages() -> TestResult {
|
||||
&alice_store_builder.store,
|
||||
&alice_address,
|
||||
&bob_store_builder.store,
|
||||
&bob_address
|
||||
&bob_address,
|
||||
)
|
||||
.await?
|
||||
);
|
||||
@@ -1707,7 +1718,7 @@ fn test_simultaneous_initiate_lost_message_repeated_messages() -> TestResult {
|
||||
&alice_store_builder.store,
|
||||
&alice_address,
|
||||
&bob_store_builder.store,
|
||||
&bob_address
|
||||
&bob_address,
|
||||
)
|
||||
.await?
|
||||
);
|
||||
@@ -1733,7 +1744,7 @@ fn test_simultaneous_initiate_lost_message_repeated_messages() -> TestResult {
|
||||
&alice_store_builder.store,
|
||||
&alice_address,
|
||||
&bob_store_builder.store,
|
||||
&bob_address
|
||||
&bob_address,
|
||||
)
|
||||
.await?
|
||||
);
|
||||
@@ -1778,7 +1789,7 @@ fn test_simultaneous_initiate_lost_message_repeated_messages() -> TestResult {
|
||||
&alice_store_builder.store,
|
||||
&alice_address,
|
||||
&bob_store_builder.store,
|
||||
&bob_address
|
||||
&bob_address,
|
||||
)
|
||||
.await?
|
||||
);
|
||||
@@ -1801,7 +1812,7 @@ fn test_simultaneous_initiate_lost_message_repeated_messages() -> TestResult {
|
||||
&alice_store_builder.store,
|
||||
&alice_address,
|
||||
&bob_store_builder.store,
|
||||
&bob_address
|
||||
&bob_address,
|
||||
)
|
||||
.await?
|
||||
);
|
||||
@@ -1829,7 +1840,7 @@ fn test_simultaneous_initiate_lost_message_repeated_messages() -> TestResult {
|
||||
&bob_store_builder.store,
|
||||
&bob_address,
|
||||
&alice_store_builder.store,
|
||||
&alice_address
|
||||
&alice_address,
|
||||
)
|
||||
.await?
|
||||
);
|
||||
@@ -1852,7 +1863,7 @@ fn test_simultaneous_initiate_lost_message_repeated_messages() -> TestResult {
|
||||
&bob_store_builder.store,
|
||||
&bob_address,
|
||||
&alice_store_builder.store,
|
||||
&alice_address
|
||||
&alice_address,
|
||||
)
|
||||
.await?
|
||||
);
|
||||
@@ -1880,7 +1891,7 @@ fn test_simultaneous_initiate_lost_message_repeated_messages() -> TestResult {
|
||||
&bob_store_builder.store,
|
||||
&bob_address,
|
||||
&alice_store_builder.store,
|
||||
&alice_address
|
||||
&alice_address,
|
||||
)
|
||||
.await?
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user