Search results for

codesign

3,112 results found

Post

Replies

Boosts

Views

Activity

codesign fails with no explanation
When I first tried to sign my local unit test with the identity generated by Xcode, it failed because the intermediate certificate was missing. In that case, the error message explained that the trust chain could not be completed. But after installing the correct intermediate, codesign still fails, but no longer gives any explanation: codesign -f -s '0EFE7E591A4E690842094B8EC5AFDFE059637D3C' build/Darwin-Xcode-arm64_obf/bin/Release/UNITTEST build/Darwin-Xcode-arm64_obf/bin/Release/UNITTEST: replacing existing signature build/Darwin-Xcode-arm64_obf/bin/Release/UNITTEST: errSecInternalComponent It's the same error line errSecInternalComponent. Is there a log somewhere that might explain what exactly is the error?
Topic: Code Signing SubTopic: General
3
0
68
Apr ’25
Reply to TKTokenSession not used
Looks like I wasn't using the right SHA1 for my cert when calling codesign. I figured I could get the cert information by using security export-smartcard -i [card] | grep sha1 sha1 : After a bit of string manipulation: DC5F8D160FCD0342AE061D70716E114BD438D668 Now when I'm calling codesign -s DC5F8D160FCD0342AE061D70716E114BD438D668 -f foobar I can see the sign method of my TKTokenSession being called. tl;dr: New identity doesn't show up in Keychain, but it doesn't mean the OS can't use it. However you need to make sure you're using the right SHA1.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25
TKTokenSession not used
Hi, I'm working on developing my own CryptoTokenKit (CTK) extension to enable codesign with HSM-backed keys. Here's what I’ve done so far: The container app sets up the tokenConfiguration with TKTokenKeychainCertificate and TKTokenKeychainKey. The extension registers successfully and is visible via pluginkit when launching the container app. The virtual smartcard appears when running security list-smartcards. The certificate, key, and identity are all visible using security export-smartcard -i [card]. However, nothing appears in the Keychain. After adding logging and reviewing output in the Console, I’ve observed the following behavior when running codesign: My TKTokenSession is instantiated correctly, using my custom TKToken implementation — so far, so good. However, none of the following TKTokenSession methods are ever called: func tokenSession(_ session: TKTokenSession, beginAuthFor operation: TKTokenOperation, constraint: Any) throws -> TKTokenAuthOperation func tokenSession(_ session
3
0
85
Apr ’25
Reply to packet-tunnel-provider-systemextension doesn't work
automation package installer script I'm using looks like this: set -euo pipefail APP_NAME=Runetale.app APP_BUNDLE=build/macos/Build/Products/Release/${APP_NAME} DEV_ID_APP_CERT=Developer ID Application: MYTEAMID DEV_ID_INSTALLER_CERT=Developer ID Installer: MYTEAMID APP_VERSION=1.0.0 APP_BUNDLE_ID=com.runetale.desktop # Apple credentials for notarization APPLE_ID= TEAM_ID= APP_SPECIFIC_PW= # clean and build rm -rf build flutter clean flutter build macos --release # Ensure the app exists if [ ! -d $APP_BUNDLE ]; then echo Error: $APP_BUNDLE not found. Make sure the app bundle is present. exit 1 fi echo Starting code signing for $APP_BUNDLE... # copy Runetale.app codesign -d -vvv build/macos/Build/Products/Release/Runetale.app ditto $APP_BUNDLE $APP_NAME # copy entitlements codesign -d --entitlements Release.entitlements --xml Runetale.app codesign -d --entitlements PacketTunnelRelease.entitlements --xml Runetale.app/Contents/Library/SystemExtensions/com.runetale.desktop.PacketTunnel.
Apr ’25
Reply to packet-tunnel-provider-systemextension doesn't work
@DTS Engineer Thank you. I read the documentation provided by Apple engineers. I was able to create the installer successfully and launch the application. However, when I try to connect to the VPN, I get the following error: default 16:53:58.419606+0900 Runetale Saving configuration Runetale with existing signature (null) error 16:53:58.420440+0900 Runetale Failed to save configuration Runetale: Error Domain=NEConfigurationErrorDomain Code=10 permission denied UserInfo={NSLocalizedDescription=permission denied} error 16:53:58.420474+0900 Runetale Failed to save configuration: Error Domain=NEVPNErrorDomain Code=5 permission denied UserInfo={NSLocalizedDescription=permission denied} error 16:53:58.420407+0900 nehelper Runetale Failed to obtain authorization right for 3: no authorization provided Is there any possible reason for this? The entitlements look like this: App entitlements com.apple.application-identifier myteamid.com.runetale.desktop com.apple.developer.networking.networkextension packet-tunnel-
Apr ’25
Reply to AppStore submission for Ruby/Glimmer app on MacOS without Xcode
To recap, my Ruby files for the app are located under ./app, with the gems being vendored. This library is located at ./app/vendor/bundle/ruby/3.3.0/gems/libui-0.1.2-arm64-darwin/vendor/libui.dylib. I'm curious if I should codesign the libui.dylib before building the binary with Tebako? If so, would I still need to codesign the Contents/Frameworks files under the app bundle? (I'm assuming yes on this latter point.) Thanks in advance for your suggestions.
Topic: Code Signing SubTopic: General
Apr ’25
packet-tunnel-provider-systemextension doesn't work
I am currently creating a MacOS app that uses NetworkExtension and SystemExtension without going through the Store. Using entitlements, I manually codesign and create a pkg Installer, but when I run it I get an error message saying No matching profile found. Below is the log /Applications/Runetale.app/Contents/MacOS/Runetale not valid: Error Domain=AppleMobileFileIntegrityError Code=-413 No matching profile found UserInfo={NSURL=file:///Applications/Runetale.app/, unsatisfiedEntitlements=<CFArray 0x71c040fa0 [0x1f7bec120]>{type = immutable, count = 3, values = ( 0 : <CFString 0x71c04f340 [0x1f7bec120]>{contents = com.apple.developer.system-extension.install} 1 : <CFString 0x71c1ccaf0 [0x1f7bec120]>{contents = com.apple.developer.networking.networkextension} 2 : <CFString 0x71c04fc00 [0x1f7bec120]>{contents = com.apple.developer.team-identifier} )}, NSLocalizedDescription=No matching profile found} I looked into it myself and found that if you want to install the app without go
6
0
143
Apr ’25
Reply to Getting a public service app not to send scary messages
Can you clarify the warning? Does it say the app was downloaded from the internet and no malware was found? Or does it say something worse? If this is an app downloaded from the internet, then it's going to say it was downloaded from the internet. No way around that unless you want to put it in the Mac App Store. If it is just an app, then there is no reason to put it inside a DMG. Just compress it into a zip file. I have no idea what you mean by complete codesigning using the third-party app itself—not via command-line scripts. Are you saying that you didn't use Xcode to build the app? If so, then you're on your own. You are totally at the mercy of whatever tool you are using to build the app. These things are a single button click in Xcode.
Topic: Code Signing SubTopic: General
Apr ’25
Getting a public service app not to send scary messages
I’ve developed a macOS app, but I’ve had trouble using a script to fully codesign it and package it into a .dmg file. I was only able to complete codesigning using the third-party app itself—not via command-line scripts. Is it possible to write a script that automates the entire process of codesigning the app? To provide the best user experience for those downloading the app outside of the Mac App Store, is it correct to first package it as a .app and then wrap that into a .dmg file for distribution? Currently, the app is available on the web as a .dmg. When downloaded, it appears in a folder and can be double-clicked to launch. However, macOS displays a warning that it was downloaded from the internet. Can I use a script to remove that quarantine warning? If possible, I’d appreciate a step-by-step explanation and a sample command-line script to: Codesign the app properly Package it into a signed .dmg Remove the quarantine attribute for local testing or distribution Is the
Topic: Code Signing SubTopic: General
3
0
108
Apr ’25
Reply to "this identity cannot be used for signing code"
Solved (or more like worked around whatever weird issue this was). I realized on this occasion I'd only tried building to VM, not YYC, although I usually tested both in the past if there were any issues. On YYC I was able to build without the codesigning error, after which I needed to open the xcodeproj manually which was located at (macuser)/gamemakerstudio2/GM_MAC/(gamename)/(gamename).
Apr ’25
Reply to setCodeSigningRequirement seems not to work in new Service Management API setup.
Blat! Sometimes I can’t see the wood for the trees )-: I downloaded your project today, installed it, re-enabled the setCodeSigningRequirement(_:) call, and then reproduced the problem. Cool. The error code logged, -67050, is errSecCSReqFailed, aka: % security error -67050 Error: 0xFFFEFA16 -67050 code failed to satisfy specified code requirement(s) This is very specific. The code doesn’t satisfy the requirement. So after a bit of faffing around I used codesign to actually test the requirement on that code: % codesign --verify -vvv -R =anchor apple AppleDTSLaunchDaemon1.app/Contents/Resources/DTSDaemon … test-requirement: code failed to satisfy specified code requirement(s) Well, that explains why XPC is complaining! But this should work, because the code is properly signed: % codesign -d -vvv AppleDTSLaunchDaemon1.app/Contents/Resources/DTSDaemon … Authority=Apple Development: Quinn Quinn (7XFU7D52S4) … And then it struck me. anchor apple is the wrong requirement. It checks whether
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25
Reply to codesign - edited signature
There are a number of potential issues here. First: [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] codesign -s My Name --keychain keychain -f --deep … [/quote] Don’t use --deep when signing code. See --deep Considered Harmful for an explanation as to why not. As to what you should do, I’ll come back to that below. [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] Unfortunately this signed package does not work when checking with spctl. [/quote] It’s generally best to avoid spctl for this sort of thing. If you want to test whether something will pass Gatekeeper, use the process described in Testing a Notarised Product. [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] codesign -dv -veurbose=4 RenderRob.app/Contents/MacOS/libcrypto.3.dylib [/quote] That definitely belongs in Contents/Frameworks. See Placing Content in a Bundle. Coming back to how you should sign your code, there’s a general process for that described in: Creating distributi
Apr ’25
Reply to Multiple Executables in a Single Bundle Fails to Launch Others After Codesign
[quote='833266022, mmccartney, /thread/778169?answerId=833266022#833266022, /profile/mmccartney'] Perhaps this is because we're trying to run things not delivered by the Mac Store yet. [/quote] If you’re trying to run a distribution-signed app then, yeah, that won’t work. See Don’t Run App Store Distribution-Signed Code. However, it seems like you were also testing development-signed app and that’s also failing. I tried your setup from Xcode, just to make sure that I wasn’t completely misleading you. AFAICT everything worked as expected. Here’s what I did: Using Xcode 16.3 on macOS 15.3.2, I created a new app from the macOS > App template. I then ran through the instructions in Embedding a command-line tool in a sandboxed app to create a new helper tool target and embed the results. I added a button that launched it: Button(Spawn) { do { print(will launch) let p = Process() let u = Bundle.main.url(forAuxiliaryExecutable: ToolX)! p.executableURL = u try p.run() print(did launch) } catch { print(did not laun
Topic: Code Signing SubTopic: General Tags:
Apr ’25
codesign - edited signature
Hey all! I'm building a Python based app with PySide6-deploy. This gives me a .app directory with all the necessary things already in it. To be able to distribute this I provided just the .app path to the codesign looking like this: codesign -s My Name --keychain keychain -f --deep RenderRob.app If I try to check or sign the package, it looks promising: codesign --verify ... RenderRob.app: valid on disk RenderRob.app: satisfies its Designated Requirement Unfortunately this signed package does not work when checking with spctl. spctl --assess --verbose RenderRob.app/Contents/MacOS/libcrypto.3.dylib RenderRob.app/Contents/MacOS/libcrypto.3.dylib: rejected If I look in the log of the notarizing, I saw that something is off with signature of the binary dependencies. Then I checked the binary dependencies, it turns out it complains about an edited signature: codesign -dv -verbose=4 RenderRob.app/Contents/MacOS/libcrypto.3.dylib RenderRob.app/Contents/MacOS/libcrypto.3.dylib: edi
2
0
86
Apr ’25
Reply to Clang warning about 'xar_open' API deprecation in macOS 12.0. How to address/replace with a more approprite API?
[quote='833602022, Etresoft, /thread/779910?answerId=833602022#833602022, /profile/Etresoft'] Or various command-line looks like pkgutil, codesign, or spctl? [/quote] [quote='833618022, DTS Engineer, /thread/779910?answerId=833618022#833618022'] Stick with installer packages but use pkgutil to check their signature. [/quote] Thanks for the responses! pkgutil was considered but we wanted to avoid parsing of the command line tools output. We are primarily interested in the certificate subject names present in the package signature. The intention is to make sure that we install packages that are not only validly signed or accepted by Gatekeeper, pkgutil. And it looks like one would need to parse the output of command line tools to check if a specific team ID is present. That's definitely doable but we wanted to look into options with proper API that we could call from ObjC/Swift before going to an option with running a command line from code.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25