Skip to content

Commit 6f05511

Browse files
committed
fix(windows): omit unused guest TLS state
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
1 parent aa5de64 commit 6f05511

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎crates/openshell-server/src/cli.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use tracing::{error, info, warn};
1414
use tracing_subscriber::EnvFilter;
1515

1616
use crate::certgen;
17+
#[cfg(not(target_os = "windows"))]
1718
use crate::compute::driver_config::GuestTlsPaths;
1819
use crate::config_file::{self, ConfigFile, GatewayFileSection};
1920
use crate::defaults::{self, LocalTlsPaths};
@@ -248,7 +249,10 @@ fn prepare_server_config(args: &mut RunArgs, matches: &ArgMatches) -> Result<Ser
248249
normalize_compute_driver_socket_args(args, matches)?;
249250

250251
let local_tls = apply_runtime_defaults(args)?;
252+
#[cfg(not(target_os = "windows"))]
251253
let guest_tls = local_tls.as_ref().map(GuestTlsPaths::from);
254+
#[cfg(target_os = "windows")]
255+
let _ = local_tls;
252256
let local_jwt = defaults::complete_local_jwt_config()?;
253257

254258
let bind = SocketAddr::new(args.bind_address, args.port);
@@ -448,6 +452,7 @@ fn prepare_server_config(args: &mut RunArgs, matches: &ArgMatches) -> Result<Ser
448452
Ok(ServerStartupConfig {
449453
config,
450454
config_file: file,
455+
#[cfg(not(target_os = "windows"))]
451456
guest_tls,
452457
})
453458
}

‎crates/openshell-server/src/lib.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ use tracing_bus::TracingLogBus;
9393
pub(crate) struct ServerStartupConfig {
9494
pub config: Config,
9595
pub config_file: Option<config_file::ConfigFile>,
96+
#[cfg(not(target_os = "windows"))]
9697
pub guest_tls: Option<compute::driver_config::GuestTlsPaths>,
9798
}
9899

@@ -284,8 +285,6 @@ pub(crate) async fn run_server(
284285
config_file,
285286
#[cfg(not(target_os = "windows"))]
286287
guest_tls,
287-
#[cfg(target_os = "windows")]
288-
guest_tls: _,
289288
} = startup;
290289

291290
auth::descriptor_authz::init()

0 commit comments

Comments
 (0)