Is it somehow possible to get my Developer ID Certificate via a shell command or via the System.Keychain module?
I tried but no success so far.
What I try to do is making a simple code signing app. I can find the certificate in Apple’s Keychain application.
But I would rather find the keychain name programmatically.
Ill give you some pointers, enough to go figure out what you need, but by no means enough to copy and paste as youre creating a competitor to App Wrapper and some of this stuff, took years for me to figure out.
You need to use declares (or MBS) to read the code signing identities from the Keychain, you can search for valid identities and get returned an object from which you can then extract the code signing certificate and from that you can get the display name.
You do NOT want to search the keychain for certificates, as certificates alone is false information. To be able to code sign you need more than just a certificate, which is where identities come in.