From 7ceda2f39c331cc4812ed7c60479eb818019bcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 31 Jul 2020 12:05:07 +0200 Subject: [PATCH] crypto: Update to the latest Ruma changes. --- matrix_sdk_crypto/src/verification/sas.rs | 30 ++++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/matrix_sdk_crypto/src/verification/sas.rs b/matrix_sdk_crypto/src/verification/sas.rs index ee67e024..14ef7a98 100644 --- a/matrix_sdk_crypto/src/verification/sas.rs +++ b/matrix_sdk_crypto/src/verification/sas.rs @@ -23,7 +23,10 @@ use matrix_sdk_common::{ api::r0::to_device::send_event_to_device::Request as ToDeviceRequest, events::{ key::verification::{ - accept::{AcceptEventContent, AcceptMethod, MSasV1Content as AcceptV1Content}, + accept::{ + AcceptEventContent, AcceptMethod, MSasV1Content as AcceptV1Content, + MSasV1ContentInit as AcceptV1ContentInit, + }, cancel::{CancelCode, CancelEventContent}, key::KeyEventContent, mac::MacEventContent, @@ -770,17 +773,20 @@ impl SasState { AcceptEventContent { transaction_id: self.verification_flow_id.to_string(), - method: AcceptMethod::MSasV1(AcceptV1Content { - commitment: self.state.commitment.clone(), - hash: accepted_protocols.hash, - key_agreement_protocol: accepted_protocols.key_agreement_protocol, - message_authentication_code: accepted_protocols.message_auth_code, - short_authentication_string: self - .state - .protocol_definitions - .short_authentication_string - .clone(), - }), + method: AcceptMethod::MSasV1( + AcceptV1ContentInit { + commitment: self.state.commitment.clone(), + hash: accepted_protocols.hash, + key_agreement_protocol: accepted_protocols.key_agreement_protocol, + message_authentication_code: accepted_protocols.message_auth_code, + short_authentication_string: self + .state + .protocol_definitions + .short_authentication_string + .clone(), + } + .into(), + ), } }