3

I am getting errSecInternalComponent when running the codesign command. If I go to the keychain and change the certificate to always trust and run codesign command again, I get Warning: unable to build chain to self-signed root for signer "Developer ID Application: xxxxxx (xxxxxx)"./workspace/Myapp.app: errSecInternalComponent

This first time this happened was when I exported the developer certificate from another MacOS and imported it. Then I tried deleting the keychains, recreating it, installing apple root certificates, but still getting the same error.

Finally, I generated a new developer certificate and added it to the keychain, but still not working.

I am not sure what's different about this MAC. It's running Majave now. When the problem first happened it was running High sierra.

laocius
  • 772
  • 1
  • 8
  • 21

3 Answers3

3

There could be many possible reasons for this error. Two frequent issues are:

  1. codesign tool does not have access to the keychain item. Either explicitly give access to codesign or allow all applications to access it.
  2. Unlock the keychain: security unlock-keychain <Full path to keychain>

Can get the full path using, security list-keychains

Siva Prakash
  • 4,626
  • 34
  • 26
2

There were two problems:

  1. I had duplicate identities in my keychain, which is the same with this Duplicate identity after importing single certificate in OSX 10.10.3

  2. The access permissions for the private key needs to allow codesign or allow all.

jeff-h
  • 2,184
  • 1
  • 22
  • 33
laocius
  • 772
  • 1
  • 8
  • 21
0

Not exactly the same issue, but we encountered a errSecInternalComponent during a build on jenkins. Increasing the timeout after which the keychain is closed again fixed it.

klinzo
  • 1