I’m facing the dreaded codesign command fails with 'errSecInternalComponent' and looking for some guidance.
I have removed the “Apple World Wide Developer Relations Authority” certificate that expired in 2023 from both the Login and System Keychain and have downloaded the latest intermediate certificates I found. I have verified all the Trust Settings are configured to “Use System Default”.
I did the basic codesign check suggested in an earlier post [https://forums.developer.apple.com/forums/thread/712005]:
% security find-identity -p codesigning
Policy: Code Signing Matching identities
- 675CE18312BFBE2735918BA897908D20DB0A774D "Apple Development: Peter Sichel (537G2NTM55)" 1 identities found
Valid identities only
- 675CE18312BFBE2735918BA897908D20DB0A774D "Apple Development: Peter Sichel (537G2NTM55)" 1 valid identities found
% cp "/usr/bin/true" "MyTrue"
% codesign -s "Apple Development" -f "MyTrue"
MyTrue: replacing existing signature MyTrue: errSecInternalComponent
——
It seems I’m still missing something. What else can I check to debug the problem?
After learning much about code signing and reviewing the problems and solutions in the Apple Dev forums I determined the "Apple Development" signing identity Xcode generated automatically failed to properly install in my Login Keychain so I manually generated a new one which is working.