diff --git a/apps/desktop/desktop_native/napi/src/lib.rs b/apps/desktop/desktop_native/napi/src/lib.rs index acc9889c487..cdf3c294f11 100644 --- a/apps/desktop/desktop_native/napi/src/lib.rs +++ b/apps/desktop/desktop_native/napi/src/lib.rs @@ -1130,7 +1130,7 @@ pub mod sshagent_v2 { } => SshUIRequest { cipher_id: None, is_list: true, - process_name: "".to_string(), + process_name: connection_info.peer_info().process_name().to_string(), is_forwarding: connection_info.is_forwarding(), namespace: None, }, @@ -1141,7 +1141,7 @@ pub mod sshagent_v2 { } => SshUIRequest { cipher_id: Some(cipher_id), is_list: false, - process_name: "".to_string(), + process_name: connection_info.peer_info().process_name().to_string(), is_forwarding: connection_info.is_forwarding(), namespace: None, }, @@ -1153,7 +1153,7 @@ pub mod sshagent_v2 { } => SshUIRequest { cipher_id: Some(cipher_id), is_list: false, - process_name: "".to_string(), + process_name: connection_info.peer_info().process_name().to_string(), is_forwarding: connection_info.is_forwarding(), namespace: Some(namespace), }, diff --git a/apps/desktop/desktop_native/ssh_agent/src/agent/ui_requester.rs b/apps/desktop/desktop_native/ssh_agent/src/agent/ui_requester.rs index d29f25cdbc4..3265cd93dec 100644 --- a/apps/desktop/desktop_native/ssh_agent/src/agent/ui_requester.rs +++ b/apps/desktop/desktop_native/ssh_agent/src/agent/ui_requester.rs @@ -41,6 +41,18 @@ impl UiRequester { .await } + /// Ask the UI to show a request for the user to approve or deny. The UI may choose to not show a prompt but only + /// require that the client is unlocked or apply other automatic rules. + pub async fn request_auth(&self, connection_info: &ConnectionInfo, cipher_id: String) -> bool { + let request_id = REQUEST_ID_COUNTER.fetch_add(1, std::sync::atomic::Ordering::SeqCst); + self.request(UiRequestMessage::AuthRequest { + request_id, + connection_info: connection_info.clone(), + cipher_id, + }) + .await + } + /// Ask the UI to show a request for the user to approve or deny. The UI may choose to not show a prompt but only /// require that the client is unlocked or apply other automatic rules. pub async fn request_sign( diff --git a/apps/desktop/desktop_native/ssh_agent/src/knownhosts/mod.rs b/apps/desktop/desktop_native/ssh_agent/src/knownhosts/mod.rs index bc6cdbc2a16..f7e431b51f1 100644 --- a/apps/desktop/desktop_native/ssh_agent/src/knownhosts/mod.rs +++ b/apps/desktop/desktop_native/ssh_agent/src/knownhosts/mod.rs @@ -124,6 +124,5 @@ github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okW "#; let entries = KnownHostsReader::parse(content).unwrap(); assert!(entries.len() <= 1); - println!("{:?}", entries); } }