Search results for

codesign

3,113 results found

Post

Replies

Boosts

Views

Activity

How does xpc_connection_set_peer_code_signing_requirement work?
I have created a XPC server and client using C APIs. I want to ensure that I trust the client, so I want to have a codesigning requirement on the server side, something like - xpc_connection_set_peer_code_signing_requirement(listener, anchor apple generic and certificate leaf[subject.OU] = 1234567) This checks if the client code was signed by a code-signing-identity issued by Apple and that the teamID in the leaf certificate is 1234567. My questions are- Is using teamID as a signing requirement enough? What else can I add to this requirement to make it more secure? How does xpc_connection_set_peer_code_signing_requirement work internally? Does it do any cryptographic operations to verify the clients signature or does it simply do string matching on the teamID? Is there a way actually verify the clients signature(cryptographically) before establishing a connection with the server? (so we know the client is who he claims to be)
2
0
568
Feb ’25
Notarized app successfully but got error when start app
Hi, I just have my app notarized by Apple notarize services. The result is no errors.Have the Request UUID: e2e784a9-8c47-41e6-9f28-355f8b107e60But when I create a .dmg file from that .app file, extracted to Applications then run, got errors: (screenshots)(node:13033) UnhandledPromiseRejectionWarning: Error: dlopen(/var/folders/x4/r6d1_9810tb47p_zkypn6fqr0000gn/T/.com.electron. bbrowser2.nYmi7D, 1): no suitable image found. Did find: /var/folders/x4/r6d1_9810tb47p_zkypn6fqr0000gn/T/.com.electron.bbrowse r2.nYmi7D: code signature in (/var/folders/x4/r6d1_9810tb47p_zkypn6fqr0000gn/T/.com.electron.bbrowser2.nYmi7D) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. /var/folders/x4/r6d1_9810tb47p_zkypn6fqr0000gn/T/.com.electron.bbrowser2.nYmi7D: stat() failed with errno=17 at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:722:18) a
3
0
1.8k
Nov ’19
App Automatically Deleted from Applications Folder - OSX
I made an application in Script Editor and it works as expected. But the app seems to be getting automatically deleted at random times. For example, I made it a few days ago, tested it successfully, then went back today to look for it and it was gone. Tested this multiple times. I bit more detail about my process: I wrote the app in Script editor, exported it as an Application with run-only checked and no code signing after manipulating a few things (.plist file, .icns file), I then remove extended attributes and code-sign using terminal. I have an Apple developer account that I use to code-sign: xattr -cr codesign -s then I copy the app into my Applications folder and test it successfully a day or more later, the app is gone (and I haven't even opened it again) Ventura 13.1, Mac Book Pro 2021
3
0
1.1k
Feb ’25
Reply to How does xpc_connection_set_peer_code_signing_requirement work?
[quote='773573021, Kray16, /thread/773573, /profile/Kray16'] 1. Is using teamID as a signing requirement enough? [/quote] Probably. You might want to tighten that up depending on your specific security goals. For example, you might want your distribution-signed server to not allow development-side clients. For more background on this, and specific info on how Apple uses code-signing requirements in general, see TN3127 Inside Code Signing: Requirements. [quote='773573021, Kray16, /thread/773573, /profile/Kray16'] 2. How does xpc_connection_set_peer_code_signing_requirement work internally? [/quote] The exact mechanics of this are complex, but you can reasonable think of it as checking the requirement against the calling process. This is a code signing operation. You can prototype it with codesign, using the --verify subcommand. Two hints: A little known fact is that you can get codesign to operate on a process by supplying a PID as an argument. TN3127 shows how to request that codesign
Feb ’25
Codesigning completes, Notarization fails using notary tool
Notarization step fails: New AppID and password created: xcrun notarytool submit “.dmg” --apple-id “” --team-id “” --password “” --verbose --wait Error: HTTP status code: 401. Your Apple ID has been locked. Visit iForgot to reset your account (https://iforgot.apple.com), then generate a new app-specific password. Ensure that all authentication arguments are correct. I have reset app password many times, not result. Codesigning completes normally: Mac OS 11.5.2 Xcode 13.2.1
5
0
2.4k
Feb ’25
App Startup Issues after Upgrade to MacOS Sequoia
Short description of the issue/suggestion: After upgrading to MacOS Sequoia and being required to code sign and notarize my app, cannot launch app even though code sign and notarization pass Please tell us about your environment: MacBookPro Chip Apple M2 Max 32 GB JavaPackager version: 1.7.6 OS version: macOS Sequoia 15.0.1 JDK version: jdk-1.8 Build tool: Maven Steps to reproduce the issue: -DMG Maven Build of Spring Boot /Java (version 8) application with fvarrui JavaPackager plugin using default universalJavaApplicationStub. Code signing and Notarization / Stapling PASS and App installs in Application folder, however cannot launch App. Although code sign and notarization pass, it is interesting that in the build output, prior to it submitting to Apple, there is an error stating that the App code sign could not be replaced. What is the expected behavior? -App launches when double clicking the application icon What have you tried to resolve / workaround the issue? -Install via package rather than DMG - same
Topic: Code Signing SubTopic: General
5
0
629
Jan ’25
Command Line Tool doesn't trigger permission prompt for audio recording
Hello, I'm developing a Command Line Tool in XCode, in order to capture system audio and save it to a file, which will then be used by a separate process. Everything works perfectly when running it from either XCode or the native terminal application (see image below), but as soon as I try to run it from any 3rd party application, it doesn't ask for permissions to record sound, and the resultant file ends up soundless. When archiving it and then running it from other 3rd party applications, e.g Warp (terminal) or spawning it as a child process from a bundled Electron application, it doesn't ask for permissions. Things of note: I've codesigned the application with Developer ID Application I've added NSAudioCaptureUsageDescriptionto Info.plist I've included Info.plist in the binary (see image below) I've added the com.apple.security.device.audio-input entitlement I've used the following resources as inspiration: https://github.com/insidegui/AudioCap https://developer.apple.com/documentation/coreaudio/c
2
0
668
Dec ’24
dlopen on development iPhone codesign issue
Hi, For the purposes of iteration speed in development builds, on an iPhone in development mode, I am attempting to use hot reloaded dylibs. The goal is that the app is rarely fully restarted and small code changes can be applied quickly, drastically reducing iteration speed. For this purpose I have a socket server on my Mac that sends changed dylibs to my app on my iPhone. This works great on Mac, however on iOS i am running into codesigning problems. I am using the following to codesign the dylib: codesign -f -s XXX --timestamp=none testlibrary-ios.dylib I am placing the downloaded dylib in this folder: const char* cachedirectoryPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0] UTF8String]; dlopen gives me the following error: dlopen(/var/mobile/Containers/Data/Application/67A3D31B-6F72-4939-9E7F-665FC78CDC61/Library/Caches/testlibrary-ios.dylib, 0x000A): tried: '/usr/lib/system/introspection/testlibrary-ios.dylib' (no such file, not in dyld
5
0
569
Jan ’25
Auditing code signatures
We are trying to get much more serious about our ability to audit signed code and trace it back to a signing event. We have a signing service that includes a bit of client code that provides a CryptoTokenKit extension to expose the signing certificate to codesign and Xcode. The private keys are held by the signing service and access is strictly controlled. The CTK extension is given a message/digest to sign, and from reading TN 3126, I believe this is representative of the code directory. For an audit trail, we can record some metadata about the signing request, such as Git repository, branch, commit SHA, etc., but the only value linked to the thing being signed is this blob. Later, if we have an app and want to link it back to the signing event, I can't figure out how to find this blob. It's not the CDHash or any other value I see in the output of codesign -d -vvvvvv. is there a way to recreate that blob given a signed artifact?
5
0
580
Jan ’25
The staple and validate action failed! Error 65.
I've tried to sign/notarize/staple my Electron app via electron-builder, using electron-notarize. I tried it as well in cmd line - both times, same result. Code signing runs without a problem. Notarize (I did wait two days first time, now it's couple of minutes) Stapling - failure `Downloaded ticket has been stored at file:///var/folders/.... Could not validate ticket for.... The staple and validate action failed! Error 65. ` I've checked, and the tickets are downloaded to said folder. My process: `codesign --deep --force --options runtime --entitlements build/entitlements.mac.plist --sign Developer ID Application: Pete... dist/mac-arm64/Modelist.app` ditto -c -k --sequesterRsrc --keepParent dist/mac-arm64/Modelist.app dist/mac-arm64/Modelist.zip xcrun notarytool submit dist/mac-arm64/Modelist.zip --apple-id email --password app_specific_pass --team-id team_id --wait Conducting pre-submission checks for Modelist.zip and initiating connection to the Apple notary service... Submission ID receive
4
0
998
Jan ’25
Reply to Developer ID Certificate (How to replace damaged certificate?)
Usually I just download them all (-: The system is good at finding intermediates that it needs and ignoring any extras. However, as you’re asking, the one you’re looking for is Developer ID - G2 (Expiring 09/17/2031 00:00:00 UTC). If you download that and Quick Look it in the Finder, you’ll see its Subject Name details match the Issuer Name details from your screen shot. On the installation front, adding it to your login keychain should be fine. The system doesn’t need this intermediate to verify code [1], it only needs it to sign code. And you do that from your user context, which has access to your login keychain. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] When you sign code the codesign embeds the complete certificate chain into the code signature. This has two consequences: The system verifying it has all the certificates it needs to do that verification. The system doing the signing needs the intermediate, which is why
Jan ’25
Code Signing Python Libraries
I am trying to code sign an application which relies on many python libraries to run. For background knowledge, the .app was created with a —onefile command on Visual Studio. I code signed my application itself using codesign --deep --force --verify --timestamp --sign Developer ID Application: Issey Yohannes (GL5BCCW69X) /Users/isseyyohannes/Desktop/Automated ALGORA.app However, when I try to run the application the error shows in terminal as follows [PYI-16345:ERROR] Failed to load Python shared library '/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python': dlopen: dlopen(/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python, 10): no suitable image found. Did find: /var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python: code signature in (/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) /var/f
Topic: Code Signing SubTopic: General
2
0
641
Jan ’25
codesign error - No such file or directory
I'm having a problem with codesign for output from Pyinstaller The files are in ~/PycharmProjects/ALP_Document_Factory_II That folder contains the icon file, the entitlement file, and also contains a dist folder where Pyinstaller places the app file (ALP_Document_Factory_II.app) The generated app works and runs when I double click it. When I run codesign: codesign -s xxxxxxxx -f --entitlements entitlements.plist -o runtime dist/ALP_Document_Factory_II.app (xxxxxxx is where I place the hash of my credential) I get the following error message: No such file or directory Here is the Terminal copy... minus my Hash dickl45@Dicks-iMac3 ALP_Document_Factory_II % codesign -s xxxxxxxxxx -f --entitlements entitlements.plist -o runtime dist/ALP_Document_Factory_II.app dist/ALP_Document_Factory_II.app: No such file or directory Earlier I was able to use codesign and notarytool, but I must be doing something wrong that I can't see. Yours baffled MacOs 15.2
4
0
543
Jan ’25
Reply to dlopen on development iPhone codesign issue
Hi Quinn, I can confirm that loading the dylib when it is copied into the app bundle works correctly, so it seems like it is not a codesigning issue but rather from where the dylib is loaded. Interpreted code is unfortunately not an option because this is for rather high performance code. Wasm could be a possibility but as far as I can see there is no functionality in iOS to execute wasm code inside of an iOS app. Can you give some more details on what holes in the firewall Xcode punches for development purposes. Maybe some of that could be used for a better dev workflow on iOS.
Topic: Code Signing SubTopic: General Tags:
Jan ’25
Unnotarized Developer ID
I'm new to notarizing applications. I'm building an Electron application using electron-packager. The signing looks solid: codesign -vvv --deep --strict path/to/app.app # satisfies its Designated Requirement But checking notarization, looks like it didn't work. spctl --assess -vv path/to/app.app # source=Unnotarized Developer ID # origin=Developer ID Application: Tyson XXXX (XXXXX) I'm wondering how to fix the Unnotarized Developer ID. Thanks!
1
0
422
Jan ’25