Repository: tauri-apps/tauri (language: rust)

Issue:
[bug] Can't open installer
### Describe the bug

### What happened?

In macOS 15.1 M1 max the [installer](https://github.com/thewh1teagle/vibe/releases/download/v3.0.0/vibe_3.0.0_aarch64.dmg) yield the following error dialog

This happens after right click -> open as well!
The app sugned with self signed certificate.

![Messenger_creation_0C755A02-4B13-4FD3-BC7E-B58808B2A3DA](https://github.com/user-attachments/assets/c46a7f83-5bc0-4f24-b6b9-e0f60ead1a9a)


### What OS are you seeing the problem on?

_No response_

### Reproduction

_No response_

### Full `tauri info` output

https://github.com/thewh1teagle/vibe/blob/269758a4c350ad4bdd8ec99dd2b8f90dc933b159/desktop/src-tauri/Cargo.toml


### Stack trace

_No response_

### Additional context

v3.0.0 source: https://github.com/thewh1teagle/vibe/tree/269758a4c350ad4bdd8ec99dd2b8f90dc933b159

Related:

- https://github.com/thewh1teagle/vibe/issues/353
- https://github.com/thewh1teagle/vibe/issues/472


Discussion / hints:

Fix patch:
diff --git a/.changes/dmg-no-selfsign.md b/.changes/dmg-no-selfsign.md
new file mode 100644
index 000000000000..ad63ef406e47
--- /dev/null
+++ b/.changes/dmg-no-selfsign.md
@@ -0,0 +1,5 @@
+---
+tauri-bundler: 'patch:bug'
+---
+
+Skip signing the .dmg if self signing via `"signingIdentity": "-"` is used.
diff --git a/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs b/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs
index 747b3963c09c..979a1c027c3c 100644
--- a/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs
+++ b/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs
@@ -194,16 +194,19 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result<
   fs::rename(bundle_dir.join(dmg_name), dmg_path.clone())?;
 
   // Sign DMG if needed
-
-  if let Some(keychain) = super::sign::keychain(settings.macos().signing_identity.as_deref())? {
-    super::sign::sign(
-      &keychain,
-      vec![super::sign::SignTarget {
-        path: dmg_path.clone(),
-        is_an_executable: false,
-      }],
-      settings,
-    )?;
+  // skipping self-signing DMGs https://github.com/tauri-apps/tauri/issues/12288
+  let identity = settings.macos().signing_identity.as_deref();
+  if identity != Some("-") {
+    if let Some(keychain) = super::sign::keychain(identity)? {
+      super::sign::sign(
+        &keychain,
+        vec![super::sign::SignTarget {
+          path: dmg_path.clone(),
+          is_an_executable: false,
+        }],
+        settings,
+      )?;
+    }
   }
 
   Ok(Bundled {


Test patch: