Skip to content
5 changes: 5 additions & 0 deletions .changes/add-fips-to-wix-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tauri-utils: minor:enhance
---

Added `fips_compliant` field to `WixConfig` so that it can be configured via `tauri.conf.json` as well.
9 changes: 7 additions & 2 deletions crates/tauri-cli/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1071,14 +1071,14 @@
]
},
{
"description": "A policy where a web view thats not in a window fully suspends tasks. This is usually the default behavior in case no policy is set.",
"description": "A policy where a web view that's not in a window fully suspends tasks. This is usually the default behavior in case no policy is set.",
"type": "string",
"enum": [
"suspend"
]
},
{
"description": "A policy where a web view thats not in a window limits processing, but does not fully suspend tasks.",
"description": "A policy where a web view that's not in a window limits processing, but does not fully suspend tasks.",
"type": "string",
"enum": [
"throttle"
Expand Down Expand Up @@ -2787,6 +2787,11 @@
"string",
"null"
]
},
"fipsCompliant": {
"description": "Enables FIPS compliant algorithms.\n Can also be enabled via the `TAURI_BUNDLER_WIX_FIPS_COMPLIANT` env var.",
"default": false,
"type": "boolean"
}
},
"additionalProperties": false
Expand Down
8 changes: 8 additions & 0 deletions crates/tauri-cli/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 +2330,14 @@
"string",
"null"
]
},
"fipsCompliant": {
"description": "Enables FIPS compliant algorithms.",
"default": null,
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false
Expand Down
9 changes: 6 additions & 3 deletions crates/tauri-cli/src/helpers/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// Copyright 2019-2025 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

Expand All @@ -11,7 +11,7 @@ pub use tauri_utils::{config::*, platform::Target};

use std::{
collections::HashMap,
env::{current_dir, set_current_dir, set_var, var_os},
env::{current_dir, set_current_dir, set_var},
ffi::OsStr,
process::exit,
sync::{Arc, Mutex, OnceLock},
Expand Down Expand Up @@ -70,6 +70,10 @@ pub fn wix_settings(config: WixConfig) -> tauri_bundler::WixSettings {
tauri_bundler::WixSettings {
version: config.version,
upgrade_code: config.upgrade_code,
fips_compliant: std::env::var("TAURI_BUNDLER_WIX_FIPS_COMPLIANT")
.ok()
.map(|v| v == "true")
.unwrap_or(config.fips_compliant),
language: tauri_bundler::WixLanguage(match config.language {
WixLanguage::One(lang) => vec![(lang, Default::default())],
WixLanguage::List(languages) => languages
Expand Down Expand Up @@ -98,7 +102,6 @@ pub fn wix_settings(config: WixConfig) -> tauri_bundler::WixSettings {
enable_elevated_update_task: config.enable_elevated_update_task,
banner_path: config.banner_path,
dialog_image_path: config.dialog_image_path,
fips_compliant: var_os("TAURI_BUNDLER_WIX_FIPS_COMPLIANT").is_some_and(|v| v == "true"),
}
}

Expand Down
8 changes: 8 additions & 0 deletions crates/tauri-cli/tauri.config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 +2330,14 @@
"string",
"null"
]
},
"fipsCompliant": {
"description": "Enables FIPS compliant algorithms.",
"default": null,
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false
Expand Down
9 changes: 7 additions & 2 deletions crates/tauri-schema-generator/schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1071,14 +1071,14 @@
]
},
{
"description": "A policy where a web view thats not in a window fully suspends tasks. This is usually the default behavior in case no policy is set.",
"description": "A policy where a web view that's not in a window fully suspends tasks. This is usually the default behavior in case no policy is set.",
"type": "string",
"enum": [
"suspend"
]
},
{
"description": "A policy where a web view thats not in a window limits processing, but does not fully suspend tasks.",
"description": "A policy where a web view that's not in a window limits processing, but does not fully suspend tasks.",
"type": "string",
"enum": [
"throttle"
Expand Down Expand Up @@ -2787,6 +2787,11 @@
"string",
"null"
]
},
"fipsCompliant": {
"description": "Enables FIPS compliant algorithms.\n Can also be enabled via the `TAURI_BUNDLER_WIX_FIPS_COMPLIANT` env var.",
"default": false,
"type": "boolean"
}
},
"additionalProperties": false
Expand Down
8 changes: 6 additions & 2 deletions crates/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,10 @@ pub struct WixConfig {
/// The required dimensions are 493px × 312px.
#[serde(alias = "dialog-image-path")]
pub dialog_image_path: Option<PathBuf>,
/// Enables FIPS compliant algorithms.
/// Can also be enabled via the `TAURI_BUNDLER_WIX_FIPS_COMPLIANT` env var.
#[serde(default, alias = "fips-compliant")]
pub fips_compliant: bool,
}

/// Compression algorithms used in the NSIS installer.
Expand Down Expand Up @@ -1492,9 +1496,9 @@ impl schemars::JsonSchema for Color {
pub enum BackgroundThrottlingPolicy {
/// A policy where background throttling is disabled
Disabled,
/// A policy where a web view thats not in a window fully suspends tasks. This is usually the default behavior in case no policy is set.
/// A policy where a web view that's not in a window fully suspends tasks. This is usually the default behavior in case no policy is set.
Suspend,
/// A policy where a web view thats not in a window limits processing, but does not fully suspend tasks.
/// A policy where a web view that's not in a window limits processing, but does not fully suspend tasks.
Throttle,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/tauri-utils/src/config_v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ pub struct WixConfig {
pub banner_path: Option<PathBuf>,
/// Path to a bitmap file to use on the installation user interface dialogs.
/// It is used on the welcome and completion dialogs.

///
/// The required dimensions are 493px × 312px.
#[serde(alias = "dialog-image-path")]
pub dialog_image_path: Option<PathBuf>,
Expand Down
Loading