diff --git a/大鱼调色/Plugin/Info.plist b/大鱼调色/Plugin/Info.plist
index a103baf..0a61da9 100644
--- a/大鱼调色/Plugin/Info.plist
+++ b/大鱼调色/Plugin/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 1.14.3
+ 1.14.4
CFBundleVersion
- 94
+ 95
NSHumanReadableCopyright
PlugInKit
@@ -71,7 +71,7 @@
uuid
1C17B73B-F229-4C09-A434-EAF6DFF5F22A
version
- 1.14.3
+ 1.14.4
className
diff --git a/大鱼调色/Shared/DYCodeIntegrity.m b/大鱼调色/Shared/DYCodeIntegrity.m
index 3241de5..47e2e98 100644
--- a/大鱼调色/Shared/DYCodeIntegrity.m
+++ b/大鱼调色/Shared/DYCodeIntegrity.m
@@ -39,22 +39,22 @@ static OSStatus DYValidateBundle(NSURL *url, NSString *identifier, SecCSFlags fl
SecStaticCodeRef code = NULL;
status = SecStaticCodeCreateWithPath((__bridge CFURLRef)url, kSecCSDefaultFlags, &code);
if (status == errSecSuccess) {
- status = SecStaticCodeCheckValidity(code, flags | kSecCSStrictValidate | kSecCSCheckAllArchitectures,
- requirement);
+ status = SecStaticCodeCheckValidity(code, flags, requirement);
CFRelease(code);
}
CFRelease(requirement);
return status;
}
-OSStatus DYValidateSignedInstallation(NSURL *wrapperURL, NSString **failedComponent) {
+static OSStatus DYValidateInstallation(NSURL *wrapperURL, SecCSFlags wrapperFlags, SecCSFlags serviceFlags,
+ NSString **failedComponent) {
if (failedComponent) *failedComponent = @"wrapper";
- OSStatus status = DYValidateBundle(wrapperURL, DYWrapperIdentifier, kSecCSDefaultFlags);
+ OSStatus status = DYValidateBundle(wrapperURL, DYWrapperIdentifier, wrapperFlags);
if (status != errSecSuccess) return status;
if (failedComponent) *failedComponent = @"service";
NSURL *serviceURL = [wrapperURL URLByAppendingPathComponent:DYPluginRelativePath isDirectory:YES];
- status = DYValidateBundle(serviceURL, DYServiceIdentifier, kSecCSCheckNestedCode);
+ status = DYValidateBundle(serviceURL, DYServiceIdentifier, serviceFlags);
if (status != errSecSuccess) return status;
// A separately signed older service with the same identity must not be mixed into this build.
@@ -68,6 +68,11 @@ OSStatus DYValidateSignedInstallation(NSURL *wrapperURL, NSString **failedCompon
return errSecSuccess;
}
+OSStatus DYValidateSignedInstallation(NSURL *wrapperURL, NSString **failedComponent) {
+ const SecCSFlags strict = kSecCSStrictValidate | kSecCSCheckAllArchitectures;
+ return DYValidateInstallation(wrapperURL, strict, strict | kSecCSCheckNestedCode, failedComponent);
+}
+
OSStatus DYValidateRunningInstallation(DYCodeRole role, NSString **failedComponent) {
BOOL isService = role == DYCodeRoleService;
if (failedComponent) *failedComponent = isService ? @"running-service" : @"running-wrapper";
@@ -84,5 +89,8 @@ OSStatus DYValidateRunningInstallation(DYCodeRole role, NSString **failedCompone
if (![wrapperURL.pathExtension isEqualToString:@"app"] ||
![bundleURL.path isEqualToString:expected.path]) return errSecCSBadBundleFormat;
}
- return DYValidateSignedInstallation(wrapperURL, failedComponent);
+ // At launch, verify both native executables and their signed identities.
+ // Leave resource and nested-framework traversal to downloaded-package verification.
+ return DYValidateInstallation(wrapperURL, kSecCSDoNotValidateResources, kSecCSDoNotValidateResources,
+ failedComponent);
}
diff --git a/大鱼调色/Wrapper Application/Info.plist b/大鱼调色/Wrapper Application/Info.plist
index 5e28463..2ddbbf1 100644
--- a/大鱼调色/Wrapper Application/Info.plist
+++ b/大鱼调色/Wrapper Application/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.14.3
+ 1.14.4
CFBundleVersion
- 94
+ 95
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
NSHumanReadableCopyright