Skip to content

Commit bdecb16

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

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);
@@ -464,6 +468,7 @@ fn prepare_server_config(args: &mut RunArgs, matches: &ArgMatches) -> Result<Ser
464468
Ok(ServerStartupConfig {
465469
config,
466470
config_file: file,
471+
#[cfg(not(target_os = "windows"))]
467472
guest_tls,
468473
})
469474
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ use tracing_bus::TracingLogBus;
248248
pub(crate) struct ServerStartupConfig {
249249
pub config: Config,
250250
pub config_file: Option<config_file::ConfigFile>,
251+
#[cfg(not(target_os = "windows"))]
251252
pub guest_tls: Option<compute::driver_config::GuestTlsPaths>,
252253
}
253254

@@ -444,8 +445,6 @@ pub(crate) async fn run_server(
444445
config_file,
445446
#[cfg(not(target_os = "windows"))]
446447
guest_tls,
447-
#[cfg(target_os = "windows")]
448-
guest_tls: _,
449448
} = startup;
450449
let (shutdown_tx, shutdown_rx) = watch::channel(false);
451450

0 commit comments

Comments
 (0)