Search results for

“codesign”

3,223 results found

Post

Replies

Boosts

Views

Activity

security commands coming from build runner yielding no results
I'm trying to sign a build coming from a gitlab runner, but for some reason security find-identity is yielding no results during the pipeline. Hitting the runner via SSH shows the results as I would expect, as well as VNCing into the runner and using the terminal. whoami on all 3 shows the same result My current attempt is to build the keychain on the fly so that I can ensure I have access to the identity, and it succeeds in building the keychain and importing the certs, but find-identity still shows zero results in the pipeline. - security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security list-keychains -d user -s $KEYCHAIN_PATH /Users/######/Library/Keychains/login.keychain-db /Library/Keychains/System.keychain - security set-keychain-settings $KEYCHAIN_PATH - security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security import $SIGNING_KEY_DECODED -P $P12_PASSWORD -A -f pkcs12 -k $KEYCHAIN_PATH -T /usr/bin/codesign - > # escape : CERT_IDENTITY=########## security set-ke
4
0
564
Dec ’24
New application certificate fails to codesign binary file with error: "Warning: unable to build chain to self-signed root for signer <certificate> <filepath>: errSecInternalComponent"
Platforms: Ventura and Big Sur Steps to Reproduce: Create new application and installer CSRs with keypairs Generate new certificates in Apple web portal Repackage certificates as .p12 using exported private keys since they are not referenced in keychain app by default. Import certificates into MacOS Keychain Set certificate access to Always Trust for all certificate uses Sign binary fails using codesign --force --sign Sign installer package succeeds using productsign --sign Additional Info: The private keys ware initially not recognized by the Keychain application resulting a certificate without a private key leaf beneath them. To resolve it I exported the private key and repackaged certificate as a .p12 file. Both certificates appear good when evaluated for code signing The installer certificate shows an intermediate and root while the application certificate does not Repackaging as .p12 with expected intermediate and root did not resolve the issue Installing all available intermediates and roots f
1
0
863
Dec ’24
App intermittently disappearing after installation
We're build a pkg with three apps in it from the command line. There is one primary app and two supporting apps. We build a folder structure inside a temp directory like below (some folder names replaced with generic ones): mkdir -p ./tmp/Applications/.hiddenfolder/ mkdir -p ./tmp/Library/Application Support/Company/ mkdir -p ./tmp/Library/Preferences/ mkdir -p ./tmp/Library/Logs/Company/ mkdir -p ./tmp/Library/LaunchAgents/ mkdir -p ./tmp/Library/Company/ mkdir -p ./tmp/Library/LaunchDaemons/ #Grant Logs Folder Read-Write Access to All chmod a+rw ./tmp/Library/Logs/Company/ chmod a+rw ./tmp/Library/Application Support/Company/ We then build and sign each app dependency and place them into the temporary folder. For each app we're calling: xcodebuild -workspace $PROJECT -scheme $TARGET -configuration Release -derivedDataPath $WORKING clean build codesign --force --deep -o runtime --entitlements ../$TARGET/$APPLICATION.entitlements --sign $DEVKEY $WORKING/Build/Products/Release/$APPLICATION.app cp -R $
1
0
362
Nov ’24
Reply to Keychain issues after installing backup on new Mac
Thank you for the reply! I verified that Automatic signing is set. I am the one-man team as Computerade Products and the popup image is attached below -showing missing private key - although the certificates appear to be new (i.e. created on my new Mac). My Test-App project Run is OK but Archive gives the same message that started this post. I'm on xCode 16.1. CodeSign /Users/michaelbirch/Library/Developer/Xcode/DerivedData/Test_App-apijkfdxvfxogbdgkozhfjnvbifn/Build/Intermediates.noindex/ArchiveIntermediates/Test App/InstallationBuildProductsLocation/Applications/Test App.app (in target 'Test App' from project 'Test App') cd /Volumes/GAGA HDD/Gaga Home/SwiftUI Projects/Test App Signing Identity: Apple Development: Michael Birch (9KD5TCGGHG) Provisioning Profile: iOS Team Provisioning Profile: * (37ed6a51-3784-499b-a588-26bed42acfc6) /usr/bin/codesign --force --sign 15E4CD69B95A3AF856ADEE7574C15D70EFF3B535 --entitlements /Users/michaelbirch/Library/Developer/Xcode/DerivedData/Test_App-apijkf
Dec ’24
Do I need a membership to codesign and notarise?
I just paid for 99$ a year and it's already 48hrs ago since I've paid. But when I click on my name it still says Pending and on the main landingpage on https://developer.apple.com/account it still says this Purchase your membership. To continue your enrollment, complete your purchase now Your purchase may take up to 48 hours to process. Do I need a membership to codesign and notarising my VST plugins? Cause that'a what I bought it for.
1
0
498
Dec ’24
Reply to Do I need a membership to codesign and notarise?
[quote='770000021, Basvandaalen, /thread/770000, /profile/Basvandaalen'] Do I need a membership to codesign and notarising my VST plugins? [/quote] Yes. [quote='770000021, Basvandaalen, /thread/770000, /profile/Basvandaalen'] But when I click on my name it still says Pending [/quote] I can’t help you with that, alas. If you’re unable to sort this out yourself, reach out to Apple Developer Programs Support via Apple > Developer > Contact Us. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Dec ’24
Testflight entitlements break local version
Hello, I cannot build a signed app that will both be accepted by Testflight and run locally. Only one or the other! I'm singing my .app and building the package thus: CODESIGN_ID=Apple Distribution: company (number) INSTALLSIGN_ID=3rd Party Mac Developer Installer: company (number) codesign --force --deep --entitlements plist.xcent -o runtime --timestamp --sign $CODESIGN_ID myapp.app productbuild --sign $INSTALLSIGN_ID --timestamp --component myapp.app /Applications myapp.pkg With entitlements: com.apple.security.get-task-allow com.apple.security.app-sandbox com.apple.security.network.client com.apple.security.files.user-selected.read-write com.apple.security.inherit com.apple.application-identifier TEAM.com.COMPANY.APPNAME com.apple.developer.team-identifier TEAM/string> If I leave out the last two entitlements com.apple.application-identifier and com.apple.developer.team-identifier, the package validates and runs locally. It can be uploaded but it is NOT accepted by Testflight. When i
1
0
704
Dec ’24
Reply to The signature of the binary is invalid during notary, but is valid in codesign
To debug this I recommend that you: Unpack the installer package. You can do this using the command-line tools described in Unpacking Apple Archives, or using a third-party app like Pacifist. Verify the code signature of the resulting app: % codesign --verify --strict --deep -vvv /path/to/your.app What does it show? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Dec ’24
revoking an existing developer id application certificate to create a new one.
Hi, I need to create a new Developer ID installer certificate as I cannot locate the private key on my old computer. I need to revoke the certificate. I have the Account holder and admin rights but I can't see the revoke option. And when I try to create a new certificate, the panel response is There is already an existing one. Again, I need to install a new Developer ID installer certificate on the KeyChain of my new computer with its private key. I can't codesign and complete my work at the moment ! I have sent several support e-mails but no single response ! Any guidance is much appreciated. thank you.
1
0
527
Dec ’24
"Asset validation failed, Invalid Code Signing" but certs match
I have an internal customer who is trying to submit an IPA to TestFlight via a Jenkins pipeline, and they are submitting their IPA to our central code signing service first. But they're seeing failures in their logs such as: { id : bb07c32d-b4d6-48c4-abfe-390a46dec3ca, status : 409, code : STATE_ERROR.VALIDATION_ERROR.90179, title : Asset validation failed, detail : Invalid Code Signing. The executable 'Payload/their.app/Frameworks/Pods_their.framework/Pods_their' must be signed with the certificate that is contained in the provisioning profile. } I obtained the signed IPA file, and examined one of the items flagged as incorrectly signed with codesign -d -vvvv. I see the correct team identifier in the output, along with the correct (Distribution) authority. I unbundled the IPA with ditto -xk, extracted the plist from the embedded provisioning file with security cms -D -i, and examined the lone developer certificate with plutil -extract DevelopCertificates.0 and certtool d. The subject name fields cor
1
0
601
Nov ’24
Unable to Write Files Within App Bundle After Codesigning and Notarization
I have already posted asking about this: [quote='768005021, CynthiaSun, /thread/768005, /profile/CynthiaSun'] Codesigned and notarized app cannot directly write files inside the app bundle... [/quote] But there are still some doubts that have not been answered. We use Qt to develop an application on the macOS platform, and we are attempting to perform code signing and notarization to ensure our the application is trusted by Apple. However, there are a few things that seem weird regarding this statement: App bundles are read-only by design. Let me provide more details. Currently, when our application starts, it needs to create folder (e.g. Temp) in the root directory of the executable For example: Myapp.app/Contents/MacOS/Myapp ---> Myapp.app/Contents/MacOS/Temp The folder is designed for storing runtime logs or config files for our application. In the past, users may also modify the settings inside target folder if needed. However, the strange thing is that after the application is codesigned
2
0
664
Nov ’24
Reply to My MacOS application has been accepted when submitted for notarisation but I am getting an error 65 when submitting for stapling. Further, notarisation fails even when run on a clean mac. It throws an unknown developer error.
When posting preformatted code, it helps if you put it in a code block. See Quinn’s Top Ten DevForums Tips for advice on how to do that. Error 65 means that you’re trying to staple a ticket to an item that’s not been validated by the notary service. However, you’ve clearly submitted that disk image to the notary service. I suspect that the disk image isn’t signed, and thus isn’t included in the resulting ticket. Do this: Dump the code signature of the disk image: % codesign -d -vvv SendFiles.dmg Note down the cdhash value. Run stapler in verbose mode. You should see it looking for a ticket for that cdhash value. Fetch the notary log for your request. Does it list the cdhash value you get in step 1. For advice on how to sign a disk image, see Packaging Mac software for distribution. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Nov ’24
task_for_pid error 5
I'm trying to use task_for_pid in a project but I keep getting error code 5 signaling some kind of signing error. Even with this script I cant seem to get it to work. #include #include #include #include #include #include int main(int argc, const char * argv[]) { task_t task; pid_t pid = argc >= 2 ? atoi(argv[1]) : 1; kern_return_t error = task_for_pid(mach_task_self(), pid, &task); printf(%d -> %x [%d - %s]n, pid, task, error, mach_error_string(error)); return error; } I've tried signing my executables using codesign and also tried building with Xcode with the Debugging Tool box checked under hardened runtime. My Info.plist file includes the SecTaskAccess key with the values allowed and debug. Hoping someone can point me towards what I'm missing here. Thanks!
4
0
3.6k
Nov ’24
security commands coming from build runner yielding no results
I'm trying to sign a build coming from a gitlab runner, but for some reason security find-identity is yielding no results during the pipeline. Hitting the runner via SSH shows the results as I would expect, as well as VNCing into the runner and using the terminal. whoami on all 3 shows the same result My current attempt is to build the keychain on the fly so that I can ensure I have access to the identity, and it succeeds in building the keychain and importing the certs, but find-identity still shows zero results in the pipeline. - security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security list-keychains -d user -s $KEYCHAIN_PATH /Users/######/Library/Keychains/login.keychain-db /Library/Keychains/System.keychain - security set-keychain-settings $KEYCHAIN_PATH - security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security import $SIGNING_KEY_DECODED -P $P12_PASSWORD -A -f pkcs12 -k $KEYCHAIN_PATH -T /usr/bin/codesign - > # escape : CERT_IDENTITY=########## security set-ke
Replies
4
Boosts
0
Views
564
Activity
Dec ’24
New application certificate fails to codesign binary file with error: "Warning: unable to build chain to self-signed root for signer <certificate> <filepath>: errSecInternalComponent"
Platforms: Ventura and Big Sur Steps to Reproduce: Create new application and installer CSRs with keypairs Generate new certificates in Apple web portal Repackage certificates as .p12 using exported private keys since they are not referenced in keychain app by default. Import certificates into MacOS Keychain Set certificate access to Always Trust for all certificate uses Sign binary fails using codesign --force --sign Sign installer package succeeds using productsign --sign Additional Info: The private keys ware initially not recognized by the Keychain application resulting a certificate without a private key leaf beneath them. To resolve it I exported the private key and repackaged certificate as a .p12 file. Both certificates appear good when evaluated for code signing The installer certificate shows an intermediate and root while the application certificate does not Repackaging as .p12 with expected intermediate and root did not resolve the issue Installing all available intermediates and roots f
Replies
1
Boosts
0
Views
863
Activity
Dec ’24
App intermittently disappearing after installation
We're build a pkg with three apps in it from the command line. There is one primary app and two supporting apps. We build a folder structure inside a temp directory like below (some folder names replaced with generic ones): mkdir -p ./tmp/Applications/.hiddenfolder/ mkdir -p ./tmp/Library/Application Support/Company/ mkdir -p ./tmp/Library/Preferences/ mkdir -p ./tmp/Library/Logs/Company/ mkdir -p ./tmp/Library/LaunchAgents/ mkdir -p ./tmp/Library/Company/ mkdir -p ./tmp/Library/LaunchDaemons/ #Grant Logs Folder Read-Write Access to All chmod a+rw ./tmp/Library/Logs/Company/ chmod a+rw ./tmp/Library/Application Support/Company/ We then build and sign each app dependency and place them into the temporary folder. For each app we're calling: xcodebuild -workspace $PROJECT -scheme $TARGET -configuration Release -derivedDataPath $WORKING clean build codesign --force --deep -o runtime --entitlements ../$TARGET/$APPLICATION.entitlements --sign $DEVKEY $WORKING/Build/Products/Release/$APPLICATION.app cp -R $
Replies
1
Boosts
0
Views
362
Activity
Nov ’24
Reply to Keychain issues after installing backup on new Mac
Thank you for the reply! I verified that Automatic signing is set. I am the one-man team as Computerade Products and the popup image is attached below -showing missing private key - although the certificates appear to be new (i.e. created on my new Mac). My Test-App project Run is OK but Archive gives the same message that started this post. I'm on xCode 16.1. CodeSign /Users/michaelbirch/Library/Developer/Xcode/DerivedData/Test_App-apijkfdxvfxogbdgkozhfjnvbifn/Build/Intermediates.noindex/ArchiveIntermediates/Test App/InstallationBuildProductsLocation/Applications/Test App.app (in target 'Test App' from project 'Test App') cd /Volumes/GAGA HDD/Gaga Home/SwiftUI Projects/Test App Signing Identity: Apple Development: Michael Birch (9KD5TCGGHG) Provisioning Profile: iOS Team Provisioning Profile: * (37ed6a51-3784-499b-a588-26bed42acfc6) /usr/bin/codesign --force --sign 15E4CD69B95A3AF856ADEE7574C15D70EFF3B535 --entitlements /Users/michaelbirch/Library/Developer/Xcode/DerivedData/Test_App-apijkf
Replies
Boosts
Views
Activity
Dec ’24
Do I need a membership to codesign and notarise?
I just paid for 99$ a year and it's already 48hrs ago since I've paid. But when I click on my name it still says Pending and on the main landingpage on https://developer.apple.com/account it still says this Purchase your membership. To continue your enrollment, complete your purchase now Your purchase may take up to 48 hours to process. Do I need a membership to codesign and notarising my VST plugins? Cause that'a what I bought it for.
Replies
1
Boosts
0
Views
498
Activity
Dec ’24
Reply to Do I need a membership to codesign and notarise?
[quote='770000021, Basvandaalen, /thread/770000, /profile/Basvandaalen'] Do I need a membership to codesign and notarising my VST plugins? [/quote] Yes. [quote='770000021, Basvandaalen, /thread/770000, /profile/Basvandaalen'] But when I click on my name it still says Pending [/quote] I can’t help you with that, alas. If you’re unable to sort this out yourself, reach out to Apple Developer Programs Support via Apple > Developer > Contact Us. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
Dec ’24
Testflight entitlements break local version
Hello, I cannot build a signed app that will both be accepted by Testflight and run locally. Only one or the other! I'm singing my .app and building the package thus: CODESIGN_ID=Apple Distribution: company (number) INSTALLSIGN_ID=3rd Party Mac Developer Installer: company (number) codesign --force --deep --entitlements plist.xcent -o runtime --timestamp --sign $CODESIGN_ID myapp.app productbuild --sign $INSTALLSIGN_ID --timestamp --component myapp.app /Applications myapp.pkg With entitlements: com.apple.security.get-task-allow com.apple.security.app-sandbox com.apple.security.network.client com.apple.security.files.user-selected.read-write com.apple.security.inherit com.apple.application-identifier TEAM.com.COMPANY.APPNAME com.apple.developer.team-identifier TEAM/string> If I leave out the last two entitlements com.apple.application-identifier and com.apple.developer.team-identifier, the package validates and runs locally. It can be uploaded but it is NOT accepted by Testflight. When i
Replies
1
Boosts
0
Views
704
Activity
Dec ’24
Reply to The signature of the binary is invalid during notary, but is valid in codesign
To debug this I recommend that you: Unpack the installer package. You can do this using the command-line tools described in Unpacking Apple Archives, or using a third-party app like Pacifist. Verify the code signature of the resulting app: % codesign --verify --strict --deep -vvv /path/to/your.app What does it show? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
Dec ’24
revoking an existing developer id application certificate to create a new one.
Hi, I need to create a new Developer ID installer certificate as I cannot locate the private key on my old computer. I need to revoke the certificate. I have the Account holder and admin rights but I can't see the revoke option. And when I try to create a new certificate, the panel response is There is already an existing one. Again, I need to install a new Developer ID installer certificate on the KeyChain of my new computer with its private key. I can't codesign and complete my work at the moment ! I have sent several support e-mails but no single response ! Any guidance is much appreciated. thank you.
Replies
1
Boosts
0
Views
527
Activity
Dec ’24
Reply to How to fix multiple signing identities?
I know it's an old thread but this may help other users. I find the first certificate's hash like this in fastlane app_signing_identity = `security find-identity -v -p codesigning | grep -m 1 Developer ID Application | awk '{print $2}'`.strip
Replies
Boosts
Views
Activity
Nov ’24
"Asset validation failed, Invalid Code Signing" but certs match
I have an internal customer who is trying to submit an IPA to TestFlight via a Jenkins pipeline, and they are submitting their IPA to our central code signing service first. But they're seeing failures in their logs such as: { id : bb07c32d-b4d6-48c4-abfe-390a46dec3ca, status : 409, code : STATE_ERROR.VALIDATION_ERROR.90179, title : Asset validation failed, detail : Invalid Code Signing. The executable 'Payload/their.app/Frameworks/Pods_their.framework/Pods_their' must be signed with the certificate that is contained in the provisioning profile. } I obtained the signed IPA file, and examined one of the items flagged as incorrectly signed with codesign -d -vvvv. I see the correct team identifier in the output, along with the correct (Distribution) authority. I unbundled the IPA with ditto -xk, extracted the plist from the embedded provisioning file with security cms -D -i, and examined the lone developer certificate with plutil -extract DevelopCertificates.0 and certtool d. The subject name fields cor
Replies
1
Boosts
0
Views
601
Activity
Nov ’24
Reply to Unable to Write Files Within App Bundle After Codesigning and Notarization
Thank you for providing the information, we now understand that modifying the app bundle after codesign is not supported. Indeed, our situation has not been completely blocked, but since Apple does not support it, we will discuss internally how to handle this, thank you.
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’24
Unable to Write Files Within App Bundle After Codesigning and Notarization
I have already posted asking about this: [quote='768005021, CynthiaSun, /thread/768005, /profile/CynthiaSun'] Codesigned and notarized app cannot directly write files inside the app bundle... [/quote] But there are still some doubts that have not been answered. We use Qt to develop an application on the macOS platform, and we are attempting to perform code signing and notarization to ensure our the application is trusted by Apple. However, there are a few things that seem weird regarding this statement: App bundles are read-only by design. Let me provide more details. Currently, when our application starts, it needs to create folder (e.g. Temp) in the root directory of the executable For example: Myapp.app/Contents/MacOS/Myapp ---> Myapp.app/Contents/MacOS/Temp The folder is designed for storing runtime logs or config files for our application. In the past, users may also modify the settings inside target folder if needed. However, the strange thing is that after the application is codesigned
Replies
2
Boosts
0
Views
664
Activity
Nov ’24
Reply to My MacOS application has been accepted when submitted for notarisation but I am getting an error 65 when submitting for stapling. Further, notarisation fails even when run on a clean mac. It throws an unknown developer error.
When posting preformatted code, it helps if you put it in a code block. See Quinn’s Top Ten DevForums Tips for advice on how to do that. Error 65 means that you’re trying to staple a ticket to an item that’s not been validated by the notary service. However, you’ve clearly submitted that disk image to the notary service. I suspect that the disk image isn’t signed, and thus isn’t included in the resulting ticket. Do this: Dump the code signature of the disk image: % codesign -d -vvv SendFiles.dmg Note down the cdhash value. Run stapler in verbose mode. You should see it looking for a ticket for that cdhash value. Fetch the notary log for your request. Does it list the cdhash value you get in step 1. For advice on how to sign a disk image, see Packaging Mac software for distribution. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
Nov ’24
task_for_pid error 5
I'm trying to use task_for_pid in a project but I keep getting error code 5 signaling some kind of signing error. Even with this script I cant seem to get it to work. #include #include #include #include #include #include int main(int argc, const char * argv[]) { task_t task; pid_t pid = argc >= 2 ? atoi(argv[1]) : 1; kern_return_t error = task_for_pid(mach_task_self(), pid, &task); printf(%d -> %x [%d - %s]n, pid, task, error, mach_error_string(error)); return error; } I've tried signing my executables using codesign and also tried building with Xcode with the Debugging Tool box checked under hardened runtime. My Info.plist file includes the SecTaskAccess key with the values allowed and debug. Hoping someone can point me towards what I'm missing here. Thanks!
Replies
4
Boosts
0
Views
3.6k
Activity
Nov ’24