mirror of
https://github.com/bitwarden/browser
synced 2026-02-03 02:03:53 +00:00
Fix build
This commit is contained in:
@@ -16,9 +16,9 @@ pub struct KnownHostEntry {
|
||||
|
||||
impl KnownHostEntry {
|
||||
/// Creates a new known host entry
|
||||
pub fn new(hostnames: String, public_key: PublicKey) -> Self {
|
||||
pub fn new(hostname: String, public_key: PublicKey) -> Self {
|
||||
Self {
|
||||
hostname: hostnames,
|
||||
hostname,
|
||||
public_key,
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
pub mod agent;
|
||||
pub mod hostinfo;
|
||||
pub mod knownhosts;
|
||||
pub mod memory;
|
||||
pub mod protocol;
|
||||
pub mod transport;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::sync::atomic::{AtomicU32, Ordering};
|
||||
|
||||
use crate::{
|
||||
hostinfo,
|
||||
knownhosts,
|
||||
protocol::types::{PublicKey, SessionId},
|
||||
transport::peer_info::PeerInfo,
|
||||
};
|
||||
@@ -60,7 +60,7 @@ impl ConnectionInfo {
|
||||
pub fn set_host_key(&mut self, host_key: PublicKey) {
|
||||
self.host_key = Some(host_key.clone());
|
||||
// Some systems (flatpak, macos sandbox) may prevent access to the known hosts file.
|
||||
if let Ok(hosts) = hostinfo::KnownHostsReader::read_default() {
|
||||
if let Ok(hosts) = knownhosts::KnownHostsReader::read_default() {
|
||||
self.host_name = hosts
|
||||
.find_host(&host_key)
|
||||
.map(|entry| entry.hostname.clone());
|
||||
|
||||
Reference in New Issue
Block a user