Use the bundleURL instead of executableURL with SecStaticCodeCreateWithPath()

The API docs say "For bundles, pass a URL to the root directory of the bundle…
If you pass a URL to the main executable of a bundle, the bundle as a whole is generally recognized."
This commit is contained in:
Isaac Wankerl committed 2015-04-13 12:55:20 -05:00
1 parent 498ed027dd
commit 47d56a5485
1 file changed
+1 -1
+1 -1
View File
@@ -44,7 +44,7 @@
goto finally;
}
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)[newBundle executableURL], kSecCSDefaultFlags, &staticCode);
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)[newBundle bundleURL], kSecCSDefaultFlags, &staticCode);
if (result != noErr) {
SULog(@"Failed to get static code %d", result);
goto finally;