Search results for

codesign

3,114 results found

Post

Replies

Boosts

Views

Activity

Reply to SMJobSubmit works in user domain, but cannot be submitted in system domain
So, we actually need to stop right here: I'm using SMJobSubmit Stop using SMJobSubmit. That API was deprecated in 10.10 (seven years ago) and I believe we'd been recommending against it for several years. The modern replacement is SMAppService, introduced in macOS 13.0. Note that this is a modern replacement, in that it specifically supports privileged helper tools embedded inside app bundles. Keep in mind that doing this: The tool is embedded in the Contents/MacOS folder. ...is not safe with SMJobSubmit and never has been. SMJobSubmit is hard coding the executable path, which means the user renaming your app (or any other manipulation) will both break your job and create an opening which could allow an attacker to insert their executable in place of your job. If you need to support older systems, then the recommended approach would be to use SMJobBless as shown in EvenBetterAuthorization to install a privileged helper tool. The helper can then be used as the target for a launchd plist, which the privileged h
Topic: App & System Services SubTopic: General Tags:
Dec ’24
codesign repeatedly asks for access to System Keychain
I'm trying to migrate the scripts that build my application from an Intel Mac running Mojave (Xcode 10.3) to an M1 Mac running Big Sur (Xcode 12.5.1). On the M1 Mac, codesign triggers a pop up a window asking for an admin username/password each time it signs something. This happens whether it is invoked via a script or directly in Terminal. The pop-up appears twice when signing a Universal binary, once when signing a single-architecture binary. The popup says: macOS wants to make changes. Enter an adminstrator's name and password to allow this. macOS wants to use the System keychain. and it has a Deny button and an Allow button, but not an Always Allow button. (Another issue: the username is not pre-populated, even though I am logged in as an admin.) My Developer ID Application certificate is stored in my login keychain, as is the Apple Worldwide Developer Relations Certification Authority certificate, which expires 2030-02-19. The System keychain contains an Apple Application Integration Certificati
9
0
18k
Jun ’22
Reply to App Crashes Due to Memory Limits Despite com.apple.developer.kernel.increased-memory-limit Entitlement
Hi, So, first off, there are actually three entitlements involved here that overlap each other to a significant extent: Increased Memory Limit -> com.apple.developer.kernel.increased-memory-limit entitlement. Increased Debugging Memory Limit -> com.apple.developer.kernel.increased-debugging-memory-limit Extended Virtual Addressing -> com.apple.developer.kernel.extended-virtual-addressing The first two (1 & 2) are fairly similar, with the difference being that, by design, the second (Debugging) variant will never be included in release builds. If you unintentionally used the second version, then that would immediately explain the failure you're seeing. In the interest of getting a response out I won't try to describe the difference between 1 & 3 beyond saying that the issues here are more complicated than get more memory. That leads to here: Used the same entitlement-enabled code and configuration for distribution. After installing the App Store version on the same device, we found the app now
Dec ’24
"The signature of the binary is invalid" macOS App Notarization Issue
After sending the app archive to apple notarization services, I received the following error: The signature of the binary is invalid. This error is shown for both the arm64 and x86_64 builds of the app. Some details about the project: I have been able to notarize the app in the past, with the latest successful notarization at the start of October. The organization does have a valid developer membership. The app has no new dependencies since the last successful notarization. The project uses automatic managed signing (no visible errors in xcode). What has changed in app and development environment since the last notarization: Updated macOS to macOS 15. Updated to use new Xcode version (16) The organizations membership did expire for a bit, but is now valid. Changed apps target macOS version from 12.3 -> 13.5. What I've tried to debug / resolve this issue: Clean build folder and re-create archive. Waiting a period of time and retrying the notarization. Toggling 'automatic managed signing' off and on. Tried t
5
0
647
Dec ’24
Trying to track down why codesign is now failing certain files
App is built using jdk21, jpackage to create dmg, pulls in the needed jre. Been working fine until about a week ago when notarize start failing bad signing, which when examined it's complaining modified files - a handful of jre license and copyright text files. DMGs built, signed and notarised successfully are now failing codesign verification. Has a macOS 15.1.1 release or Xcode 16.1 patched something, is there new behaviour to be aware of plse?
Topic: Code Signing SubTopic: General
2
0
461
Dec ’24
Reply to "The signature of the binary is invalid" macOS App Notarization Issue
Thank you for the suggestions, here are my results: Exporting In order to export my app archive through the organizer, I followed these steps: Xcode 16 -> Organizer -> Distribute App -> Custom -> Direct Distribution -> Export -> Automatically Manage Signing -> Export. Notarytool + Log After exporting, I followed Customizing the notarization workflow in order to run notarytool. You were right, the process was easier than I thought that it would be. After running notarytool, I was able to get the log file from the failed notarization by running xcrun notarytool log .... I have attached the log file below. Case Sensitive Volume I created a case sensitive volume using the disk utility app. After copying over and unpacking my app, I re-ran codesign --verify --strict --deep -vvv …, which produced different results than my original debugging session. The output was a lot shorter than my initial run (maybe from detecting the issue?). This seems to be the issue from the output: --prepared
Topic: Code Signing SubTopic: Notarization Tags:
Dec ’24
App Store Connect incorrectly considering submission from Xcode as Beta
When attempting to add a recent build to an External test group, I am receiving the error: This build is using a beta version of Xcode and can’t be submitted. Make sure you’re using the latest version of Xcode or the latest seed release found on the releases tab in News and Updates This build is a macOS app built with Unity, which is then codesigned, packaged with productbuild, and then uploaded with xcrun altool --upload-package. The version of Xcode being used was released about a week ago. Xcode Version 15.4 (15F31d), built of an Intel Mac Mini running macOS 14.4.1 (23E224). I have seen threads in the past about this, but nothing recent. (1,2)
1
0
594
May ’24
Outgoing SSL connections fail on macOS 15, work fine on earlier versions
The OpenSSL library interface to Allegro Common Lisp system stopped working with macOS 15.x (15.0.1 and 15.1). We have tried many versions of OpenSSL. 1.1.1t (which we built ourselves), 3.0.x, 3.3.x, 3.4.0. All work fine on macOS 14 and earlier. All fail on macOS 15. What is bizarre about the failure: we can load the SSL libraries fine, but when we try to make an outgoing connection it fails (with varying errors). Also, trying to use lldb to debug just hangs, once we step into the SSL libraries. More specifically, using Homebrew OpenSSL 3.0.15 gives an exception that we see in lldb, but we cannot step into SSL_ctrl(), which is in libssl.3.dylib, provided by Homebrew. We have also tried a version of OpenSSL 1.1.1t that we built ourselves (and codesigned and is included in the notarized app), and it fails with a SEGV, rather than the error below, which is using 3.0.15: What started this were errors using the OpenSSL libraries. Here's the use case: cl-user(2): (net.aserve.client:do-http-request https://
23
0
1.5k
Dec ’24
Adding a sandboxed v2ray precompiled binary to my application
Greetings! I want to add my pre-compiled binary of v2ray to my application so I can activate it in background as a proxy and run stuff through it. I've codesigned it via: codesign -s - -i production.myproject.v2ray -o runtime --entitlements v2ray.entitlements -f v2ray Contents of entitlements file: com.apple.security.app-sandbox com.apple.security.files.downloads.read-write com.apple.security.files.user-selected.read-write com.apple.security.network.client com.apple.security.network.server Originally I ran it like this without sandboxing from my main target app: guard let v2rayPath = Bundle.main.path(forResource: v2ray, ofType: nil) else { throw NSError(domain: ProxyController, code: 1, userInfo: [NSLocalizedDescriptionKey: V2Ray binary not found in bundle]) } let task = Process() task.executableURL = URL(fileURLWithPath: v2rayPath) task.arguments = [-config, configURL.path] // Redirect output for debugging let pipe = Pipe() task.standardOutput = pipe task.standardError = pipe```
2
0
621
Dec ’24
Reply to Trying to track down why codesign is now failing certain files
It’s hard to answer this without a lot more details. In general, macOS and the notary service continue to tighten up their checking of code in order to close security holes. Some of those are big changes, when we tend to announce widely. I have a bunch of links to such things in Trusted Execution Resources and the other Resources posts that it links to. But some of them are relatively minor changes that don’t get widely advertised. And some changes are just implementation changes that happen to cause problems for code that’s not following the rules [1]. [quote='770552021, hamish258, /thread/770552, /profile/hamish258'] DMGs built, signed and notarised successfully are now failing codesign verification. [/quote] If you run syspolicy_check against such an app, what does it report? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] Historically those rules were very poorly documented. That’s much better these days, but lots of code, a
Topic: Code Signing SubTopic: General
Dec ’24
Reply to ASN.1 structure of DER encoded entitlements
[quote='817395022, wiedem, /thread/770409?answerId=817395022#817395022, /profile/wiedem'] I can understand if it's not actively supported, but I wouldn't call providing technical documentation 'active support'. [/quote] I think the current situation is instructive. Presumably you built your code signature parsing code back when the entitlements were stored as a property list. Doing that was unsupported. That code broke when we switched to ASN.1, and hence this thread. I’m trying to avoid repeating this cycle, where your code breaks again the next time we revise the code signature format. Remember, DTS’s goal is to help developers build products that work now and in the future. We don’t support things that run counter to that goal. [quote='817395022, wiedem, /thread/770409?answerId=817395022#817395022, /profile/wiedem'] Wasn't the codesign utility once open source? [/quote] I’m not sure if codesign was ever open source, but the core code signing infrastructure is. It lives within the Security
Dec ’24
Reply to "The signature of the binary is invalid" macOS App Notarization Issue
The approach I usually take is to export the app from the Xcode organiser and then use notarytool to attempt to notarise that. The advantage of that approach is that you end up with a notary log [1] and the exact file that was submitted to the notary service. You can then look at the file to see what’s what. I’ve found that using Xcode for notarisation is very convenient under normal circumstances, but it adds a layer of abstraction that I’d rather not have when I’m dealing with the weird stuff. Submitting with notarytool is pretty easy; see Customizing the notarization workflow for instructions. Once you have these two bits of info — the file you submitted and the notary log — there are two things I’d recommend you do: Unpack the file on a case-sensitive volume and see if that changes the result of the code signature verification (that is, the codesign --verify --strict --deep -vvv … command). Check the zip archive for extended attributes. You can list the archive’s content with unzip -l. You want t
Topic: Code Signing SubTopic: Notarization Tags:
Dec ’24
Cannot sign my app
Hello, I am on maxOS 14.6 and I developed a C++ application for macOS with graphical-user interface by using wxWidgets. The .app application bundle is built correctly and the application runs. Now I would like to sign it to get it notarized. I get the following error sudo codesign -vvv --deep --strict MyApp.app/Contents/MacOS/MyApp MyApps.app/Contents/MacOS/MyApp: code has no resources but signature indicates they must be present If I check the signature I get % pkgutil --check-signature MyApp.app Package MyApp: Status: package is invalid (checksum did not verify) How may I fix this? Thank you!
Topic: Code Signing SubTopic: General
1
0
364
Dec ’24
Reply to ASN.1 structure of DER encoded entitlements
[quote='817402022, DTS Engineer, /thread/770409?answerId=817402022#817402022'] So, yeah, DTS doesn’t support that. [/quote] I can understand if it's not actively supported, but I wouldn't call providing technical documentation 'active support'. There are several official Apple articles on the subject, but most of them are not very detailed. Wasn't the codesign utility once open source? Since the reorganisation of Apple's OSS pages, many things are not so easy to find. [quote='817402022, DTS Engineer, /thread/770409?answerId=817402022#817402022'] Please post your bug number, just for the record. [/quote] The Feedback Assistant ID is FB16077892 (But for some reason my feedback seems to have been deleted immediately? At least I don't seem to be able to access it anymore) Based on my experience over the last 15 years with this type of developer feedback for iOS development, it will be years before such a feature is available in iOS. If an implementation is considered at all. In the meantime, we need a pr
Dec ’24
Can an application signed with "com.apple.security.cs.disable-library-validation" be published as trusted?
I am working on releasing my macOS arm64 app. My problem is that after the user downloads the dmg, double-clicking my.app in the dmg, a Gatekeeper pop-up box will appear with a warning that the developer cannot be verified. Question: Can an application signed with com.apple.security.cs.disable-library-validation be published as trusted? If yes, what steps have I missed? If not, can I get an official response from Apple? (Because I referred to this post, it seems to mention that it is possible to publish trusted software.I have looked up similar questions on the forum and tried many things, but nothing works. ) Here are my steps: Use the codesign to sign my.app. Because my app needs to access third-party dynamic libraries, entitlements.plist contains a com.apple.security.cs.disable-library-validation. After the codesign -dvvv check, the signature was successful.✅ Use the xcrun notarytool command to notarize my app, and the status is displayed as accepted.✅ Use xcrun stapler staple to attach t
3
0
693
Dec ’24