1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-03 02:03:53 +00:00

Fix build

This commit is contained in:
Bernd Schoolmann
2025-10-17 09:04:55 +02:00
parent 64583e3e0c
commit fa6e86faa8
3 changed files with 5 additions and 5 deletions

View File

@@ -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,
}
}

View File

@@ -1,5 +1,5 @@
pub mod agent;
pub mod hostinfo;
pub mod knownhosts;
pub mod memory;
pub mod protocol;
pub mod transport;

View File

@@ -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());