After properly creating a valid certificate for code signing, when running the command:
$ codesign -s CertificateName AppPathName
I always get a:
CertificateName: no identity found
Anyways, When I open the Keychain Access I see that certificate created in the System folder (with a + circle over it).
Also, when I run:
$ security find-identity -p codesigning ~/Library/Keychains/System.keychain
The result is:
Policy: Code Signing Matching identities 0 identities found Valid identities only 0 valid identities found
What does this mean?
My console does not have access to the keychain? I also tried everything with sudo.
(I use zsh Terminal if that is important)
I've also found out that the System Keychain is locked, but unlocking it won't work and after performing a codesign action it goes back to "locked" again.