When I first tried to sign my local unit test with the identity generated by Xcode, it failed because the intermediate certificate was missing. In that case, the error message explained that the trust chain could not be completed. But after installing the correct intermediate, codesign still fails, but no longer gives any explanation:
codesign -f -s '0EFE7E591A4E690842094B8EC5AFDFE059637D3C' build/Darwin-Xcode-arm64_obf/bin/Release/UNITTEST
build/Darwin-Xcode-arm64_obf/bin/Release/UNITTEST: replacing existing signature
build/Darwin-Xcode-arm64_obf/bin/Release/UNITTEST: errSecInternalComponent
It's the same error line "errSecInternalComponent". Is there a log somewhere that might explain what exactly is the error?