Segmentation fault: 11 when attempting to codesign .app

戏子无情 提交于 2019-12-21 07:13:32

问题


I haven't been able to find a definition for this error in relation to codesigning. I'm really quite stumped as of what to do.

The error occurs when attempting to execute this command line:

codesign -s "Developer ID Application: Name (ID)" -fv --deep Application.app/

System:

XCode 6.2 on Yosemite 10.10.3

I've reinstalled XCode, still without any luck. This is for a desktop application.

Apologies if this is a silly question!


回答1:


A solution I found on the Apple forum worked for me: first, run the following command to find your identity's hex ID:

$ security find-identity -v
1) A048017A43F8C9C993128B0101B81CD07049601E "lldb_codesign"
...

Then you can use that hex identifier to sign:

codesign -s A048017A43F8C9C993128B0101B81CD07049601E /usr/local/bin/gdb

Some other tips I came across while debugging this:

  • You have to give the full path to the binary (/usr/local/bin/gdb, not just gdb). It won't look on the PATH, I assume for security reasons.
  • You have to run the codesign as root if the directory your binary is in is not user-owned.



回答2:


passing --timestamp=none seems to make the crash go away.




回答3:


I've encountered this in Xcode 8.3.2 when I inadvertently wound up with duplicates of my signing certificates. @kristina's answer gave me the clue; $ security find-identity -v showed me two entries with identical hashes. I fixed it by deleting the first certificate in the list with that hash, via:

$ sudo security delete-certificate -Z <SHA hash>



来源:https://stackoverflow.com/questions/29687605/segmentation-fault-11-when-attempting-to-codesign-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!