mirror of
https://github.com/bitwarden/browser
synced 2026-02-08 04:33:38 +00:00
Ssh sig support
This commit is contained in:
@@ -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),
|
||||
},
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -124,6 +124,5 @@ github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okW
|
||||
"#;
|
||||
let entries = KnownHostsReader::parse(content).unwrap();
|
||||
assert!(entries.len() <= 1);
|
||||
println!("{:?}", entries);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user