crypto: Cancel the verification request for to-device Sas verifications

master
Damir Jelić 2021-07-19 09:32:48 +02:00
parent 7433003ffa
commit 909cd42ac1
4 changed files with 7 additions and 2 deletions

View File

@ -43,7 +43,7 @@ use crate::{
olm::{InboundGroupSession, PrivateCrossSigningIdentity, Session, Utility}, olm::{InboundGroupSession, PrivateCrossSigningIdentity, Session, Utility},
store::{Changes, CryptoStore, DeviceChanges, Result as StoreResult}, store::{Changes, CryptoStore, DeviceChanges, Result as StoreResult},
verification::VerificationMachine, verification::VerificationMachine,
OutgoingVerificationRequest, Sas, ToDeviceRequest, VerificationRequest, OutgoingVerificationRequest, Sas, ToDeviceRequest,
}; };
#[cfg(test)] #[cfg(test)]
use crate::{OlmMachine, ReadOnlyAccount}; use crate::{OlmMachine, ReadOnlyAccount};

View File

@ -142,6 +142,7 @@ impl VerificationMachine {
identity, identity,
None, None,
true, true,
None,
); );
let request = match content { let request = match content {
@ -565,6 +566,7 @@ mod test {
None, None,
None, None,
true, true,
None,
); );
machine machine

View File

@ -1172,6 +1172,7 @@ impl RequestState<Ready> {
other_identity, other_identity,
Some(t.to_owned()), Some(t.to_owned()),
we_started, we_started,
Some(request_handle),
); );
(sas, content) (sas, content)
} }

View File

@ -195,6 +195,7 @@ impl Sas {
other_identity: Option<ReadOnlyUserIdentities>, other_identity: Option<ReadOnlyUserIdentities>,
transaction_id: Option<String>, transaction_id: Option<String>,
we_started: bool, we_started: bool,
request_handle: Option<RequestHandle>,
) -> (Sas, OutgoingContent) { ) -> (Sas, OutgoingContent) {
let (inner, content) = InnerSas::start( let (inner, content) = InnerSas::start(
account.clone(), account.clone(),
@ -212,7 +213,7 @@ impl Sas {
store, store,
other_identity, other_identity,
we_started, we_started,
None, request_handle,
), ),
content, content,
) )
@ -627,6 +628,7 @@ mod test {
None, None,
None, None,
true, true,
None,
); );
let flow_id = alice.flow_id().to_owned(); let flow_id = alice.flow_id().to_owned();