title: codesign throws err 'errSecInternalComponent'
body: <p>I am getting <code>errSecInternalComponent</code> when running the codesign command.
  If I go to the keychain and change the certificate to <code>always trust</code> and run <code>codesign</code> command again, I get <code>Warning: unable to build chain to self-signed root for signer "Developer ID Application: xxxxxx (xxxxxx)"./workspace/Myapp.app: errSecInternalComponent</code></p>
  
  <p>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.</p>
  
  <p>Finally, I generated a new developer certificate and added it to the keychain, but still not working.</p>
  
  <p>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.</p>