Skip to content

Commit 3819081

Browse files
committed
fix: dylib signing & pairing file installation
fix: pairing file installation
1 parent c6590f3 commit 3819081

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

apps/plumeimpactor/src/frame.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ impl PlumeFrame {
677677
.map_err(|e| format!("Failed to sign bundle: {}", e))?;
678678

679679
package_file = bundle.bundle_dir().to_path_buf();
680+
signer_settings = signer.options;
680681
}
681682
SignerMode::Adhoc => {
682683
let mut signer = Signer::new(None, signer_settings.clone());
@@ -710,6 +711,7 @@ impl PlumeFrame {
710711
.map_err(|e| format!("Failed to sign bundle: {}", e))?;
711712

712713
package_file = bundle.bundle_dir().to_path_buf();
714+
signer_settings = signer.options;
713715
}
714716
_ => {
715717
let bundle = package

crates/types/src/bundle.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
use super::PlistInfoTrait;
22
use crate::Error;
3+
use goblin::mach::{
4+
fat::FAT_MAGIC,
5+
header::{MH_MAGIC, MH_MAGIC_64},
6+
};
37
use plist::Value;
48
use std::{fs, path::PathBuf};
59

@@ -243,10 +247,11 @@ fn is_macho_dylib(path: &std::path::Path) -> bool {
243247
return false;
244248
}
245249

246-
matches!(
247-
u32::from_be_bytes(magic),
248-
0xfeedface | 0xfeedfacf | 0xcafebabe | 0xcafebabf
249-
)
250+
let be = u32::from_be_bytes(magic);
251+
let le = u32::from_le_bytes(magic);
252+
253+
matches!(be, MH_MAGIC | MH_MAGIC_64 | FAT_MAGIC)
254+
|| matches!(le, MH_MAGIC | MH_MAGIC_64 | FAT_MAGIC)
250255
}
251256

252257
#[derive(Debug, Clone, PartialEq)]

0 commit comments

Comments
 (0)