Skip to content

Commit 8b52f99

Browse files
committed
Fixed formatting
1 parent af38045 commit 8b52f99

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/macos.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ use tauri::{plugin::PluginApi, AppHandle, Runtime};
44
use crate::models::*;
55

66
mod codesign {
7-
use objc2_security::{kSecCSCheckAllArchitectures, kSecCSCheckNestedCode, kSecCSStrictValidate, SecCSFlags, SecCode};
7+
use objc2_security::{
8+
kSecCSCheckAllArchitectures, kSecCSCheckNestedCode, kSecCSStrictValidate, SecCSFlags,
9+
SecCode,
10+
};
811
use std::ptr::NonNull;
912

1013
/// Returns `Ok(())` if the running binary is code-signed and valid, otherwise returns an Error.
@@ -23,13 +26,11 @@ mod codesign {
2326
}
2427

2528
// 2) Validate the dynamic code - this checks if the signature is valid
26-
let validity_flags = SecCSFlags(kSecCSCheckAllArchitectures | kSecCSCheckNestedCode | kSecCSStrictValidate);
27-
let self_code_ref = self_code_ptr.as_ref().as_ref().unwrap();
28-
let status = SecCode::check_validity(
29-
self_code_ref,
30-
validity_flags,
31-
None,
29+
let validity_flags = SecCSFlags(
30+
kSecCSCheckAllArchitectures | kSecCSCheckNestedCode | kSecCSStrictValidate,
3231
);
32+
let self_code_ref = self_code_ptr.as_ref().as_ref().unwrap();
33+
let status = SecCode::check_validity(self_code_ref, validity_flags, None);
3334
if status != 0 {
3435
return Err(std::io::Error::new(
3536
std::io::ErrorKind::Other,

0 commit comments

Comments
 (0)