From cae13991f74dc4ecdad121e9a1d4314030506bc4 Mon Sep 17 00:00:00 2001 From: lli Date: Thu, 25 Jul 2024 09:46:56 -0700 Subject: [PATCH 1/7] Require Inviter Key and Store in HarnessAgent Signed-off-by: lli --- .../src/controllers/did_exchange.rs | 16 +++++++++++++- aries/agents/aath-backchannel/src/main.rs | 2 ++ .../src/handlers/did_exchange.rs | 12 ++++------- .../src/protocols/did_exchange/mod.rs | 21 +++++++++++++++++++ .../did_exchange/state_machine/generic/mod.rs | 2 +- .../responder/response_sent/mod.rs | 18 ++-------------- 6 files changed, 45 insertions(+), 26 deletions(-) diff --git a/aries/agents/aath-backchannel/src/controllers/did_exchange.rs b/aries/agents/aath-backchannel/src/controllers/did_exchange.rs index 501a40f320..a876bb9cf2 100644 --- a/aries/agents/aath-backchannel/src/controllers/did_exchange.rs +++ b/aries/agents/aath-backchannel/src/controllers/did_exchange.rs @@ -128,6 +128,13 @@ impl HarnessAgent { }; let thid = request.decorators.thread.clone().unwrap().thid; + + let inviter_did = request.content.did.clone(); + self.inviter_keys + .write() + .unwrap() + .insert(thid.clone(), inviter_did); + Ok(json!({ "connection_id": thid }).to_string()) } @@ -178,6 +185,13 @@ impl HarnessAgent { let request_thread = &request.inner().decorators.thread; + let inviter_key = request_thread + .as_ref() + .and_then(|th| self.inviter_keys.read().unwrap().get(&th.thid).cloned()) + .ok_or_else(|| { + HarnessError::from_msg(HarnessErrorType::InvalidState, "Inviter key not found") + })?; + let opt_invitation = match request_thread.as_ref().and_then(|th| th.pthid.as_ref()) { Some(pthid) => { let invitation = self.aries_agent.out_of_band().get_invitation(pthid)?; @@ -188,7 +202,7 @@ impl HarnessAgent { let (thid, pthid, my_did, their_did) = self .aries_agent .did_exchange() - .handle_msg_request(request, opt_invitation) + .handle_msg_request(request, &inviter_key, opt_invitation) .await?; if let Some(pthid) = pthid { diff --git a/aries/agents/aath-backchannel/src/main.rs b/aries/agents/aath-backchannel/src/main.rs index 28706dd79b..6bb4b52d57 100644 --- a/aries/agents/aath-backchannel/src/main.rs +++ b/aries/agents/aath-backchannel/src/main.rs @@ -75,6 +75,7 @@ pub struct HarnessAgent { // todo: extra didx specific AATH service didx_msg_buffer: RwLock>, didx_pthid_to_thid: Mutex>, + inviter_keys: RwLock>, } #[macro_export] @@ -121,6 +122,7 @@ async fn main() -> std::io::Result<()> { status: Status::Active, didx_msg_buffer: Default::default(), didx_pthid_to_thid: Mutex::new(Default::default()), + inviter_keys: RwLock::new(HashMap::new()), }))) .app_data(web::Data::new(RwLock::new(Vec::::new()))) .service( diff --git a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs index b602110917..3214014caf 100644 --- a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs +++ b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs @@ -15,7 +15,7 @@ use aries_vcx::{ AriesMessage, }, protocols::did_exchange::{ - resolve_enc_key_from_did_doc, resolve_enc_key_from_invitation, + resolve_enc_key_from_did, resolve_enc_key_from_did_doc, resolve_enc_key_from_invitation, state_machine::{ generic::{GenericDidExchange, ThinState}, helpers::create_peer_did_4, @@ -125,6 +125,7 @@ impl DidcommHandlerDidExchange { pub async fn handle_msg_request( &self, request: AnyRequest, + request_did: &String, invitation: Option, ) -> AgentResult<(String, Option, String, String)> { // todo: type the return type @@ -144,14 +145,9 @@ impl DidcommHandlerDidExchange { // Todo: "invitation_key" should not be None; see the todo inside this scope let invitation_key = match invitation { - None => { - // TODO: Case for "implicit invitations", where request is sent on basis of - // knowledge of public DID However in that cases we should - // probably use the Recipient Verkey which was used to anoncrypt the Request msg - None - } + None => resolve_enc_key_from_did(&request_did, &self.resolver_registry).await?, Some(invitation) => { - Some(resolve_enc_key_from_invitation(&invitation, &self.resolver_registry).await?) + resolve_enc_key_from_invitation(&invitation, &self.resolver_registry).await? } }; diff --git a/aries/aries_vcx/src/protocols/did_exchange/mod.rs b/aries/aries_vcx/src/protocols/did_exchange/mod.rs index df8d3f4f03..ca388bfc89 100644 --- a/aries/aries_vcx/src/protocols/did_exchange/mod.rs +++ b/aries/aries_vcx/src/protocols/did_exchange/mod.rs @@ -115,6 +115,27 @@ pub async fn resolve_enc_key_from_invitation( } } +pub async fn resolve_enc_key_from_did( + did: &String, + resolver_registry: &Arc, +) -> Result { + let output = resolver_registry + .resolve(&did.clone().try_into()?, &Default::default()) + .await + .map_err(|err| { + AriesVcxError::from_msg( + AriesVcxErrorKind::InvalidDid, + format!("DID resolution failed: {err}"), + ) + })?; + info!( + "resolve_enc_key_from_did >> Resolved did document {}", + output.did_document + ); + let did_doc = output.did_document; + resolve_enc_key_from_did_doc(&did_doc) +} + /// Attempts to resolve a [Key] in the [DidDocument] that can be used for sending encrypted /// messages. The approach is: /// * check the service for a recipient key, diff --git a/aries/aries_vcx/src/protocols/did_exchange/state_machine/generic/mod.rs b/aries/aries_vcx/src/protocols/did_exchange/state_machine/generic/mod.rs index fc5adacb05..5b563d40de 100644 --- a/aries/aries_vcx/src/protocols/did_exchange/state_machine/generic/mod.rs +++ b/aries/aries_vcx/src/protocols/did_exchange/state_machine/generic/mod.rs @@ -118,7 +118,7 @@ impl GenericDidExchange { resolver_registry: &Arc, request: AnyRequest, our_peer_did: &PeerDid, - invitation_key: Option, + invitation_key: Key, ) -> Result<(Self, AnyResponse), AriesVcxError> { let TransitionResult { state, output } = DidExchangeResponder::::receive_request( diff --git a/aries/aries_vcx/src/protocols/did_exchange/state_machine/responder/response_sent/mod.rs b/aries/aries_vcx/src/protocols/did_exchange/state_machine/responder/response_sent/mod.rs index 27e1ffba44..e0fdff3ed7 100644 --- a/aries/aries_vcx/src/protocols/did_exchange/state_machine/responder/response_sent/mod.rs +++ b/aries/aries_vcx/src/protocols/did_exchange/state_machine/responder/response_sent/mod.rs @@ -33,7 +33,7 @@ impl DidExchangeResponder { resolver_registry: &Arc, request: AnyRequest, our_peer_did: &PeerDid, - invitation_key: Option, + invitation_key: Key, ) -> Result, AnyResponse>, AriesVcxError> { debug!( @@ -51,21 +51,7 @@ impl DidExchangeResponder { DidExchangeTypeV1::V1_1(_) => assemble_did_rotate_attachment(our_peer_did.did()), DidExchangeTypeV1::V1_0(_) => ddo_to_attach(our_did_document.clone())?, }; - let attachment = match invitation_key { - Some(invitation_key) => { - // TODO: this must happen only if we rotate DID; We currently do that always - // can skip signing if we don't rotate did document (unique p2p invitations - // with peer DIDs) - jws_sign_attach(unsigned_attachment, invitation_key, wallet).await? - } - None => { - // TODO: not signing if invitation_key is not provided, that would be case for - // implicit invitations. However we should probably sign with - // the key the request used as recipient_vk to anoncrypt the request - // So argument "invitation_key" should be required - unsigned_attachment - } - }; + let attachment = jws_sign_attach(unsigned_attachment, invitation_key, wallet).await?; let request_id = request.id.clone(); let request_pthid = request.decorators.thread.and_then(|thid| thid.pthid); From a65a52c18e5d8698aee208f17f2c61727d3e4122 Mon Sep 17 00:00:00 2001 From: lli Date: Thu, 25 Jul 2024 14:50:15 -0700 Subject: [PATCH 2/7] Minor Clippy/Test fixes Signed-off-by: lli --- aries/agents/aath-backchannel/src/controllers/did_exchange.rs | 2 +- aries/agents/aath-backchannel/src/controllers/issuance.rs | 1 + aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs | 2 +- aries/aries_vcx/src/protocols/did_exchange/mod.rs | 4 ++-- aries/aries_vcx/tests/test_did_exchange.rs | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/aries/agents/aath-backchannel/src/controllers/did_exchange.rs b/aries/agents/aath-backchannel/src/controllers/did_exchange.rs index a876bb9cf2..4e884bffec 100644 --- a/aries/agents/aath-backchannel/src/controllers/did_exchange.rs +++ b/aries/agents/aath-backchannel/src/controllers/did_exchange.rs @@ -202,7 +202,7 @@ impl HarnessAgent { let (thid, pthid, my_did, their_did) = self .aries_agent .did_exchange() - .handle_msg_request(request, &inviter_key, opt_invitation) + .handle_msg_request(request, &inviter_key.clone(), opt_invitation) .await?; if let Some(pthid) = pthid { diff --git a/aries/agents/aath-backchannel/src/controllers/issuance.rs b/aries/agents/aath-backchannel/src/controllers/issuance.rs index 34a27d5a03..79c3d7528d 100644 --- a/aries/agents/aath-backchannel/src/controllers/issuance.rs +++ b/aries/agents/aath-backchannel/src/controllers/issuance.rs @@ -95,6 +95,7 @@ async fn download_tails_file( let url = match tails_base_url.to_string().matches('/').count() { 0 => format!("{}/{}", tails_base_url, rev_reg_id), 1.. => tails_base_url.to_string(), + _ => todo!(), }; let client = reqwest::Client::new(); let tails_folder_path = std::env::current_dir() diff --git a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs index 3214014caf..7e00162999 100644 --- a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs +++ b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs @@ -125,7 +125,7 @@ impl DidcommHandlerDidExchange { pub async fn handle_msg_request( &self, request: AnyRequest, - request_did: &String, + request_did: &str, invitation: Option, ) -> AgentResult<(String, Option, String, String)> { // todo: type the return type diff --git a/aries/aries_vcx/src/protocols/did_exchange/mod.rs b/aries/aries_vcx/src/protocols/did_exchange/mod.rs index ca388bfc89..fe17e135e4 100644 --- a/aries/aries_vcx/src/protocols/did_exchange/mod.rs +++ b/aries/aries_vcx/src/protocols/did_exchange/mod.rs @@ -116,11 +116,11 @@ pub async fn resolve_enc_key_from_invitation( } pub async fn resolve_enc_key_from_did( - did: &String, + did: &str, resolver_registry: &Arc, ) -> Result { let output = resolver_registry - .resolve(&did.clone().try_into()?, &Default::default()) + .resolve(&did.try_into()?, &Default::default()) .await .map_err(|err| { AriesVcxError::from_msg( diff --git a/aries/aries_vcx/tests/test_did_exchange.rs b/aries/aries_vcx/tests/test_did_exchange.rs index bb3f34c8a9..a7f7f6cf58 100644 --- a/aries/aries_vcx/tests/test_did_exchange.rs +++ b/aries/aries_vcx/tests/test_did_exchange.rs @@ -135,7 +135,7 @@ async fn did_exchange_test( &resolver_registry, request, &responders_peer_did, - Some(invitation_key.clone()), + invitation_key.clone(), ) .await .unwrap(); @@ -337,7 +337,7 @@ async fn did_exchange_test_with_invalid_rotation_signature() -> Result<(), Box Date: Thu, 25 Jul 2024 15:20:00 -0700 Subject: [PATCH 3/7] Clippy Signed-off-by: lli --- aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs index 7e00162999..33a0e6a372 100644 --- a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs +++ b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs @@ -145,7 +145,7 @@ impl DidcommHandlerDidExchange { // Todo: "invitation_key" should not be None; see the todo inside this scope let invitation_key = match invitation { - None => resolve_enc_key_from_did(&request_did, &self.resolver_registry).await?, + None => resolve_enc_key_from_did(request_did, &self.resolver_registry).await?, Some(invitation) => { resolve_enc_key_from_invitation(&invitation, &self.resolver_registry).await? } From 34773828e184bae49836f41ccfa3d1146847e967 Mon Sep 17 00:00:00 2001 From: lli Date: Thu, 25 Jul 2024 15:46:01 -0700 Subject: [PATCH 4/7] Clippy Signed-off-by: lli --- aries/agents/aath-backchannel/src/controllers/issuance.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/aries/agents/aath-backchannel/src/controllers/issuance.rs b/aries/agents/aath-backchannel/src/controllers/issuance.rs index 79c3d7528d..34a27d5a03 100644 --- a/aries/agents/aath-backchannel/src/controllers/issuance.rs +++ b/aries/agents/aath-backchannel/src/controllers/issuance.rs @@ -95,7 +95,6 @@ async fn download_tails_file( let url = match tails_base_url.to_string().matches('/').count() { 0 => format!("{}/{}", tails_base_url, rev_reg_id), 1.. => tails_base_url.to_string(), - _ => todo!(), }; let client = reqwest::Client::new(); let tails_folder_path = std::env::current_dir() From a41f731e99c3142d864dcb3d9b5468d472d6a90d Mon Sep 17 00:00:00 2001 From: lli Date: Fri, 26 Jul 2024 13:21:50 -0700 Subject: [PATCH 5/7] change anon unpacks to return rec_vk Signed-off-by: lli --- .../src/controllers/did_exchange.rs | 9 +----- .../src/controllers/didcomm.rs | 21 ++++++++++---- .../src/handlers/did_exchange.rs | 9 ++++-- .../src/utils/encryption_envelope.rs | 29 +++++++++++-------- 4 files changed, 39 insertions(+), 29 deletions(-) diff --git a/aries/agents/aath-backchannel/src/controllers/did_exchange.rs b/aries/agents/aath-backchannel/src/controllers/did_exchange.rs index 4e884bffec..218670a0f3 100644 --- a/aries/agents/aath-backchannel/src/controllers/did_exchange.rs +++ b/aries/agents/aath-backchannel/src/controllers/did_exchange.rs @@ -128,13 +128,6 @@ impl HarnessAgent { }; let thid = request.decorators.thread.clone().unwrap().thid; - - let inviter_did = request.content.did.clone(); - self.inviter_keys - .write() - .unwrap() - .insert(thid.clone(), inviter_did); - Ok(json!({ "connection_id": thid }).to_string()) } @@ -202,7 +195,7 @@ impl HarnessAgent { let (thid, pthid, my_did, their_did) = self .aries_agent .did_exchange() - .handle_msg_request(request, &inviter_key.clone(), opt_invitation) + .handle_msg_request(request, inviter_key, opt_invitation) .await?; if let Some(pthid) = pthid { diff --git a/aries/agents/aath-backchannel/src/controllers/didcomm.rs b/aries/agents/aath-backchannel/src/controllers/didcomm.rs index 8354bb7a77..4da1c5e7ba 100644 --- a/aries/agents/aath-backchannel/src/controllers/didcomm.rs +++ b/aries/agents/aath-backchannel/src/controllers/didcomm.rs @@ -1,5 +1,9 @@ use std::sync::RwLock; +use crate::{ + error::{HarnessError, HarnessErrorType, HarnessResult}, + HarnessAgent, +}; use actix_web::{web, HttpResponse, Responder}; use aries_vcx_agent::aries_vcx::{ messages::{ @@ -19,11 +23,6 @@ use aries_vcx_agent::aries_vcx::{ utils::encryption_envelope::EncryptionEnvelope, }; -use crate::{ - error::{HarnessError, HarnessErrorType, HarnessResult}, - HarnessAgent, -}; - impl HarnessAgent { async fn handle_connection_msg(&self, msg: Connection) -> HarnessResult<()> { match msg { @@ -211,7 +210,7 @@ impl HarnessAgent { } pub async fn receive_message(&self, payload: Vec) -> HarnessResult { - let (message, sender_vk) = EncryptionEnvelope::anon_unpack_aries_msg( + let (message, sender_vk, recipient_vk) = EncryptionEnvelope::anon_unpack_aries_msg( self.aries_agent.wallet().as_ref(), payload.clone(), ) @@ -222,6 +221,16 @@ impl HarnessAgent { "Received anoncrypted message", ) })?; + + let connection_id = self + .aries_agent + .connections() + .get_by_sender_vk(sender_vk.clone())?; + self.inviter_keys + .write() + .unwrap() + .insert(connection_id.clone(), recipient_vk); + info!("Received message: {}", message); match message { AriesMessage::Notification(msg) => { diff --git a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs index 33a0e6a372..f4cd27518d 100644 --- a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs +++ b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs @@ -15,7 +15,7 @@ use aries_vcx::{ AriesMessage, }, protocols::did_exchange::{ - resolve_enc_key_from_did, resolve_enc_key_from_did_doc, resolve_enc_key_from_invitation, + resolve_enc_key_from_did_doc, resolve_enc_key_from_invitation, state_machine::{ generic::{GenericDidExchange, ThinState}, helpers::create_peer_did_4, @@ -27,6 +27,7 @@ use aries_vcx::{ use aries_vcx_wallet::wallet::base_wallet::BaseWallet; use did_resolver_registry::ResolverRegistry; use did_resolver_sov::did_resolver::did_doc::schema::did_doc::DidDocument; +use public_key::{Key, KeyType}; use url::Url; use crate::{ @@ -125,7 +126,7 @@ impl DidcommHandlerDidExchange { pub async fn handle_msg_request( &self, request: AnyRequest, - request_did: &str, + inviter_key: String, invitation: Option, ) -> AgentResult<(String, Option, String, String)> { // todo: type the return type @@ -143,9 +144,11 @@ impl DidcommHandlerDidExchange { .thid .clone(); + let inviter_key = Key::from_base58(&inviter_key, KeyType::Ed25519)?; + // Todo: "invitation_key" should not be None; see the todo inside this scope let invitation_key = match invitation { - None => resolve_enc_key_from_did(request_did, &self.resolver_registry).await?, + None => inviter_key, Some(invitation) => { resolve_enc_key_from_invitation(&invitation, &self.resolver_registry).await? } diff --git a/aries/aries_vcx/src/utils/encryption_envelope.rs b/aries/aries_vcx/src/utils/encryption_envelope.rs index 90f7534213..dcd86a953f 100644 --- a/aries/aries_vcx/src/utils/encryption_envelope.rs +++ b/aries/aries_vcx/src/utils/encryption_envelope.rs @@ -184,33 +184,37 @@ impl EncryptionEnvelope { async fn _unpack_a2a_message( wallet: &impl BaseWallet, encrypted_data: Vec, - ) -> VcxResult<(String, Option)> { + ) -> VcxResult<(String, Option, String)> { trace!( "EncryptionEnvelope::_unpack_a2a_message >>> processing payload of {} bytes", encrypted_data.len() ); let unpacked_msg = wallet.unpack_message(&encrypted_data).await?; - Ok((unpacked_msg.message, unpacked_msg.sender_verkey)) + Ok(( + unpacked_msg.message, + unpacked_msg.sender_verkey, + unpacked_msg.recipient_verkey, + )) } pub async fn anon_unpack_aries_msg( wallet: &impl BaseWallet, encrypted_data: Vec, - ) -> VcxResult<(AriesMessage, Option)> { - let (message, sender_vk) = Self::anon_unpack(wallet, encrypted_data).await?; + ) -> VcxResult<(AriesMessage, Option, String)> { + let (message, sender_vk, recipient_vk) = Self::anon_unpack(wallet, encrypted_data).await?; let a2a_message = serde_json::from_str(&message).map_err(|err| { AriesVcxError::from_msg( AriesVcxErrorKind::InvalidJson, format!("Cannot deserialize A2A message: {}", err), ) })?; - Ok((a2a_message, sender_vk)) + Ok((a2a_message, sender_vk, recipient_vk)) } pub async fn anon_unpack( wallet: &impl BaseWallet, encrypted_data: Vec, - ) -> VcxResult<(String, Option)> { + ) -> VcxResult<(String, Option, String)> { trace!( "EncryptionEnvelope::anon_unpack >>> processing payload of {} bytes", encrypted_data.len() @@ -244,7 +248,7 @@ impl EncryptionEnvelope { expected_vk ); - let (a2a_message, sender_vk) = Self::_unpack_a2a_message(wallet, encrypted_data).await?; + let (a2a_message, sender_vk, _) = Self::_unpack_a2a_message(wallet, encrypted_data).await?; trace!( "anon_unpack >> a2a_msg: {:?}, sender_vk: {:?}", a2a_message, @@ -309,7 +313,7 @@ pub mod unit_tests { .await .unwrap(); - let (data_unpacked, sender_verkey) = + let (data_unpacked, sender_verkey, _) = EncryptionEnvelope::anon_unpack(&setup.wallet, envelope.0) .await .unwrap(); @@ -386,7 +390,7 @@ pub mod unit_tests { .await .unwrap(); - let (fwd_msg, _) = EncryptionEnvelope::anon_unpack(&setup.wallet, envelope.0) + let (fwd_msg, _, _) = EncryptionEnvelope::anon_unpack(&setup.wallet, envelope.0) .await .unwrap(); let fwd_payload = serde_json::from_str::(&fwd_msg) @@ -394,9 +398,10 @@ pub mod unit_tests { .get("msg") .unwrap() .to_string(); - let (core_payload, _) = EncryptionEnvelope::anon_unpack(&setup.wallet, fwd_payload.into()) - .await - .unwrap(); + let (core_payload, _, _) = + EncryptionEnvelope::anon_unpack(&setup.wallet, fwd_payload.into()) + .await + .unwrap(); assert_eq!(data_original, core_payload); } From 3ea2644978d8f4632a9c9cfcdfd9a97ce6fe6cd3 Mon Sep 17 00:00:00 2001 From: lli Date: Mon, 29 Jul 2024 12:24:58 -0700 Subject: [PATCH 6/7] clippy Signed-off-by: lli --- aries/agents/aath-backchannel/src/controllers/didcomm.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aries/agents/aath-backchannel/src/controllers/didcomm.rs b/aries/agents/aath-backchannel/src/controllers/didcomm.rs index 4da1c5e7ba..fe6cac82c0 100644 --- a/aries/agents/aath-backchannel/src/controllers/didcomm.rs +++ b/aries/agents/aath-backchannel/src/controllers/didcomm.rs @@ -1,9 +1,5 @@ use std::sync::RwLock; -use crate::{ - error::{HarnessError, HarnessErrorType, HarnessResult}, - HarnessAgent, -}; use actix_web::{web, HttpResponse, Responder}; use aries_vcx_agent::aries_vcx::{ messages::{ @@ -23,6 +19,11 @@ use aries_vcx_agent::aries_vcx::{ utils::encryption_envelope::EncryptionEnvelope, }; +use crate::{ + error::{HarnessError, HarnessErrorType, HarnessResult}, + HarnessAgent, +}; + impl HarnessAgent { async fn handle_connection_msg(&self, msg: Connection) -> HarnessResult<()> { match msg { From 91d58652f1970a75dd0f673caeb27906db6bf73a Mon Sep 17 00:00:00 2001 From: lli Date: Thu, 1 Aug 2024 10:50:27 -0700 Subject: [PATCH 7/7] Remove TODO comments Signed-off-by: lli --- aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs index f4cd27518d..63d162e637 100644 --- a/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs +++ b/aries/agents/aries-vcx-agent/src/handlers/did_exchange.rs @@ -146,7 +146,6 @@ impl DidcommHandlerDidExchange { let inviter_key = Key::from_base58(&inviter_key, KeyType::Ed25519)?; - // Todo: "invitation_key" should not be None; see the todo inside this scope let invitation_key = match invitation { None => inviter_key, Some(invitation) => {