Search results for

codesign

3,112 results found

Post

Replies

Boosts

Views

Activity

Reply to Notarization service says signature invalid, but codesign says it's fine
Thank for those UUIDs. I asked the notary team for a copy of those submissions, so I could see exactly what the submitted zip archives look like, and that revealed a clear problem. Consider this file listing of your notarytool submission: % unzip -t ok-035482f3-855c-455f-bd60-6be63ceefd61.zip Archive: ok-035482f3-855c-455f-bd60-6be63ceefd61.zip … testing: Wwwwwwww.app/Contents/MacOS/graphviz/bin/gvmap.sh OK testing: __MACOSX/Wwwwwwww.app/Contents/MacOS/graphviz/bin/._gvmap.sh OK … No errors detected in compressed data of ok-035482f3-855c-455f-bd60-6be63ceefd61.zip. Note I’ve redacted stuff using my ‘patented’ ‘first letter’ algorithm [1]. First up, the __MACOSX indicates that you’ve sequestered Mac metadata. That doesn’t make sense in this context. I explain why in Extended Attributes and Zip Archives. However, the real issue is that you have Mac metadata at all! Unpacking the archive I see this: % xattr Wwwwwwww.app/Contents/MacOS/graphviz/bin/gvmap.sh com.apple.cs.CodeDirectory com.apple.cs.CodeRequirements
May ’25
codesign command failed - Requirement syntax error - unexpected token
I am trying to distribute my Unity app to test flight. Build works on iPhone locally, archiving also works but when I start distribution to test flight I get this Error codesign command failed (/var/folders/gn/ql1bht8j2z7b18b3xtt0j7rr0000gn/T/XcodeDistPipeline.~~~2gmyFJ/Root/Payload/TondoJigsaw2.app/Frameworks/UnityFramework.framework: replacing existing signature /var/folders/gn/ql1bht8j2z7b18b3xtt0j7rr0000gn/T/XcodeDistPipeline.~~~2gmyFJ/Root/Payload/TondoJigsaw2.app/Frameworks/UnityFramework.framework: invalid or corrupted code requirement(s) Requirement syntax error(s): line 1:152: unexpected token: sQuaricon ) I am not sure what is the problem Team name is: “sQuaricon” Name Surname s.p. Bundle ID is: com.Squaricon.TondoJigsaw2 When I change bundle ID to com.testasd.TondoJigsaw2 (I do this in Xcode before archiving) that error disappears and I reach the part where I have to pick language. Even though this is not the solution, I think it is interesting, it implies issue might be with Bundle ID but
2
0
102
May ’25
Notarization Successful but Stapling Fails with Error 65
Product: macOS, Notarization Tool: notarytool, Stapler Tool: xcrun stapler, Application: master-billing.app, DMG: master-billing.dmg I'm attempting to notarize and staple a macOS .dmg file containing a signed .app. Notarization completes successfully, but the stapling step fails with Error 65. All tools are up-to-date and I'm following the official Apple process. #!/bin/bash set -e APP=dist/mac-arm64/master-billing.app DMG=dist/mac-arm64/master-billing.dmg IDENTITY=Developer ID Application: NAME (TEAM ID) PROFILE=notarysiva VOLUME_NAME=MasterBilling Sign binaries and frameworks find $APP -type f ( -name .dylib -or -name .so -or -name *.node -or -perm -u+x ) -exec codesign --force --options runtime --timestamp --sign $IDENTITY {} ; find $APP -type d ( -name .app -or -name .framework ) -exec codesign --force --options runtime --timestamp --sign $IDENTITY {} ; codesign --deep --force --options runtime --timestamp --sign $IDENTITY $APP Create DMG hdiutil create -volname $VOLUME_NAME -sr
1
0
149
May ’25
Reply to security: SecKeychainItemImport: The user name or passphrase you entered is not correct.
Any updates on the bug ? Same issue. Sequoia 15.4.1 (24E263) OpenSSL 3.4.0 Steps for repoducing: Create .p12 without password openssl genpkey -algorithm RSA -out private_key.pem openssl req -new -key private_key.pem -out csr.pem openssl x509 -req -days 365 -in csr.pem -signkey private_key.pem -out certificate.pem openssl pkcs12 -export -out bundle.p12 -inkey private_key.pem -in certificate.pem Import .p12 to a keychain import bundle.p12 -k login.keychain -T /usr/bin/codesign -P And voila you've got the bug: security: SecKeychainItemImport: MAC verification failed during PKCS12 import (wrong password?)
Topic: Privacy & Security SubTopic: General Tags:
May ’25
Reply to Notarization Fails: “The binary is not signed with a valid Developer ID certificate” for Flutter macOS App Plugins (file_picker, file_saver, url_launcher_macos)
It’s really hard to read your post. Please take a look at Quinn’s Top Ten DevForums Tips, which has lots of suggestions for how to work effectively on the forums. Anyway, what I can see is this: [quote='784184021, BenAuerDev, /thread/784184, /profile/BenAuerDev'] Are there known issues with signing Flutter plugin frameworks for notarization? [/quote] I think you might have more luck asking that via the support channel for the third-party tool you’re using. However, my experience is that third-party tooling tends to bend the bundle placement rules outlined in Placing Content in a Bundle, and that causes all sorts of weird problems. [quote='784184021, BenAuerDev, /thread/784184, /profile/BenAuerDev'] Using both codesign --deep [/quote] I strongly recommend against using --deep when signing code. See --deep Considered Harmful. As to what you should do, you can find my general advice in: Creating distribution-signed code for macOS Packaging Mac software for distribution Beyond that, it’s hard to offer sp
Topic: Code Signing SubTopic: Notarization Tags:
May ’25
Notarization Fails: “The binary is not signed with a valid Developer ID certificate” for Flutter macOS App Plugins (file_picker, file_saver, url_launcher_macos)
Hi all, I’m trying to notarize a Flutter macOS app built in CI (GitHub Actions). The app builds and signs fine locally—codesign --verify --deep --strict and spctl --assess both pass. However, Apple’s notarization service consistently rejects the app with errors like: The binary is not signed with a valid Developer ID certificate: file_picker.framework The binary is not signed with a valid Developer ID certificate: file_saver.framework The binary is not signed with a valid Developer ID certificate: url_launcher_macos.framework What I’ve tried: Explicitly re-signing all frameworks with my Developer ID Application certificate and --timestamp Removing existing signatures before re-signing Ensuring correct entitlements and bundle identifier Matching the app bundle name and identifier in all places Using both codesign --deep and manual signing of each binary Local validation always passes, but notarization fails in CI Certificate: I am using a “Developer ID Application” certificate (not a “Mac Dev
1
0
125
May ’25
Reply to Integrating CryptoTokenKit with productsign
I’ve not looked into the installer package side of this in depth but, in general, the transition from SHA1 to SHA256 is driven by the deployment target. If your product supports old releases, the system has to include both hashes to ensure compatibility with those systems. Now, with codesign I’m familiar with how that’s controlled, that is, via various Mach-O load commands. You can dump these using vtool. For installer packages, the productbuild man page described how you set the minimum supported OS version. Are you doing that? And just for testing, try setting it way up, to something silly like macOS 15. If that works, you can then step it back to determine the inflexion point. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Privacy & Security SubTopic: General Tags:
May ’25
Integrating CryptoTokenKit with productsign
Hi all, I'm using a CryptoTokenKit (CTK) extension to perform code signing without having the private key stored on my laptop. The extension currently only supports the rsaSignatureDigestPKCS1v15SHA256 algorithm: func tokenSession(_ session: TKTokenSession, supports operation: TKTokenOperation, keyObjectID: TKToken.ObjectID, algorithm: TKTokenKeyAlgorithm) -> Bool { return algorithm.isAlgorithm(SecKeyAlgorithm.rsaSignatureDigestPKCS1v15SHA256) } This setup works perfectly with codesign, and signing completes without any issues. However, when I try to use productsign, the system correctly detects and delegates signing to my CTK extension, but it seems to always request rsaSignatureDigestPKCS1v15SHA1 instead: productsign --timestamp --sign unsigned.pkg signed.pkg productsign: using timestamp authority for signature productsign: signing product with identity Developer ID Installer: () from keychain (null) ... Error Domain=NSOSStatusErrorDomain Code=-50 algid:sign:RSA:digest-PKCS1v15:SHA1: algorithm
7
0
521
May ’25
I can't distribute the build to Testflight
Hi the best community! When I try to submit the app to Testflight I receive the following error: codesign command failed (/var/folders/j9/yh_rkh114rbgvmglf4gycj8w0000gn/T/XcodeDistPipeline.~~~OW0Dwk/Root/Payload/Application.app/Frameworks/Alamofire.framework: replacing existing signature /var/folders/j9/yh_rkh114rbgvmglf4gycj8w0000gn/T/XcodeDistPipeline.~~~OW0Dwk/Root/Payload/Application.app/Frameworks/Alamofire.framework: invalid or corrupted code requirement(s) Requirement syntax error(s): line 1:155: unexpected token: NPH ) I have never stuck with this issue before. Xcode Version 16.0 I assume that there is something related to code signing and our company name in App Store connect: Medical Institution “NPH” (The company name has been anonymized for privacy purposes.) Appreciate any help. Thank you!
1
0
79
May ’25
Reply to productbuild hangs with no output in github actions
also can confirm that I can take my bosses p12 files and set them up on my computer using this script KEYCHAIN_PATH1=$HOME/Library/Keychains/tmpsed1.keychain-db KEYCHAIN_PASSWORD1=$(openssl rand -base64 12) security create-keychain -p $KEYCHAIN_PASSWORD1 $KEYCHAIN_PATH1 security unlock-keychain -p $KEYCHAIN_PASSWORD1 $KEYCHAIN_PATH1 echo keychain-path=$KEYCHAIN_PATH1 echo keychain-password=$KEYCHAIN_PASSWORD1 #DEV_ID_APPLICATION=$(mktemp) #echo $DEV_ID_APPLICATION #base64 -i app.p12 | base64 -d >$DEV_ID_APPLICATION #cat $DEV_ID_APPLICATION security import app.p12 -f pkcs12 -k $KEYCHAIN_PATH1 -P password -T /usr/bin/codesign -T /usr/bin/security export DEV_ID_INSTALLER=$(mktemp) base64 -i installer.p12 | base64 -d >$DEV_ID_INSTALLER security import installer.p12 -f pkcs12 -k $HOME/Library/Keychains/tmpsed1.keychain-db -P “password” -T /usr/bin/pkgbuild -T /usr/bin/security -T /usr/bin/productbuild rm $DEV_ID_INSTALLER security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PATH1 $K
May ’25
CodeSign : errSecInternalComponent
I’ve been wrestling with this for nearly a week now and none of the proposed fixes have worked. I’m trying to resign an app via Jenkins and have done the following: Created a custom keychain Imported the required .p12 certificates Installed the Apple WWDR certificate in the System keychain Made the login keychain my default Added my development keychain, the login keychain and the System keychain to the user keychain list Unlocked my development keychain Confirmed my signing identity is present Granted the appropriate partition list access to the keychain security set-key-partition-list -S apple-tool:,codesign: -k pwd /Users/ec2-user/Library/Keychains/development.keychain-db Yet when I invoke Fastlane’s resign action, I still see: _floatsignTemp/Payload/EverMerge.app/Frameworks/AppLovinSDK.framework: replacing existing signature _floatsignTemp/Payload/EverMerge.app/Frameworks/AppLovinSDK.framework: errSecInternalComponent Encountered an error, aborting! Any guidance on what might be causing this errS
1
0
112
May ’25
Issues Signing .app with Developer ID Certificate — Missing Private Key and Pipeline Concerns
I’m having issues trying to codesign a .app file. We generated the Developer ID Application certificate using the organization owner’s account. I downloaded the certificate to my Mac and imported it into my keychain, but when I run the codesign command below, I get the following error. Could you help me? What am I doing wrong? Is there any other way to sign the .app executable? From what I’ve seen in other posts, it looks like the certificate needs to have a private key, but the certificate I download from the developer portal doesn’t include the key. Also, about exporting it as a .p12 — I couldn’t quite understand if that’s considered a safe practice, since the organization owner’s private key would be included in this certificate that we plan to use in our pipeline.
1
0
99
May ’25
Reply to Gatekeeper "bundle_id: NOT_A_BUNDLE" rejection
[quote='837189022, LinuxProg, /thread/782331?answerId=837189022#837189022, /profile/LinuxProg'] It would be very useful for Apple to add a test VM creation CLI to the developer toolkit [/quote] I tend to agree but, given that current reality, I encourage you to explore the raft of third-party options out there [1]. As to your original issue, adding an extension is the right option here. macOS draws a clear distinction between bundled and non-bundle code. This really matters when comes to code signing. See the discussion is Creating distribution-signed code for macOS. That Java runtime is signed as a bundle: % codesign -d -vvv jdk-21.0.7+6-jre Executable=/Users/quinn/Desktop/jdk-21.0.7+6-jre/Contents/MacOS/libjli.dylib Identifier=net.java.openjdk.jre Format=bundle with Mach-O thin (arm64) ^^^^^^ However, the exact definition of what constitutes a bundle is more squishy then it should be. It seems that codesign and Gatekeeper disagree as to whether the file name extension is required, which is
Topic: Code Signing SubTopic: Notarization Tags:
Apr ’25
Reply to macOS 11.x system reported an error when using endpoint security
Yeah, this stuff is complex )-: Let me clarify this by example. My go-to suggestion for setting this up is to do what Xcode does. In fact, we have that in the official documentation, namely Signing a daemon with a restricted entitlement. If you follow that process and build the test project with Xcode, you see this: % codesign -d --entitlements - Test782415.app … [Dict] [Key] com.apple.application-identifier [Value] [String] SKMME9E2Y8.com.example.apple-samplecode.Test782415 [Key] com.apple.developer.endpoint-security.client [Value] [Bool] true [Key] com.apple.developer.team-identifier [Value] [String] SKMME9E2Y8 [Key] com.apple.security.get-task-allow [Value] [Bool] true % security cms -D -i Test782415.app/Contents/embedded.provisionprofile | plutil -p - { … Entitlements => { com.apple.application-identifier => SKMME9E2Y8.com.example.apple-samplecode.Test782415 com.apple.developer.endpoint-security.client => 1 com.apple.developer.team-identifier => SKMME9E2Y8 keychain-access-groups =>
Topic: Code Signing SubTopic: Entitlements Tags:
Apr ’25