1

After upgrading to macOS 10.12 Sierra and Xcode 8, code signing is broken for me.

Every time I try to sign an app, no matter how simple, I get /usr/bin/codesign failed with exit code 11.

3 Answers 3

2

Retry running codesign.

Occasionally, we encounter build failures in our CI system from codesign with exit code 11 for no apparent reason. Looking in Console.app I see a segmentation fault in thread Dispatch queue: com.apple.security.XPCTimeStampingService. I understand that this means that some error occurred trying to talk to the timestamp server.

This isn't the same issue as OP, but I found this question while investigating my issue.

Sign up to request clarification or add additional context in comments.

Comments

1

Encountered the same issue today, but in my case, there were no expired certificates in Keychain. Trick from https://forums.developer.apple.com/thread/65055 worked for me:

I got both issues with a fresh new certificate, so it was not just about the certificate being old. But I got around it by specifying the certificate by ID instead of name — first getting the ID via:

security find-identity -p codesigning

and, from the output of that, copying the long hex ID for the key I want, and pasting that into my codesign invocation:

sudo codesign -s 001CA54450805B2D8D1646793D0339BA7EB931D1 --timestamp=none /opt/local/bin/ggdb

Comments

0

Turns out the reason was that I had to delete expired certificates from Keychain.

Hope I saved you a few minutes of aimless, frustrated troubleshooting.

1 Comment

This also worked for me (after running clean). Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.