productbuild and Keychain Access concern

productbuild cmd: productbuild --component /Applications/Very\ Large\ Number\ Calculator.app /Applications --sign "3rd Party Mac Developer Installer: Alain_B " /Applications/Very\ Large\ Number\ Calculator.pkg

Give this error:

Cannot write product to "/Applications/Very Large Number Calculator.pkg". (Could not find appropriate signing identity for “3rd Party Mac Developer Installer: Alain_B ”.)

But Keychain Access show "3rd Party Mac Developer Installer" is in Certificates:


3rd Party Mac Developer Application: 10 digits (64......J5) certificate login Nov 10, 2027 at 8:02:04 AM

Alain_B private key login

3rd Party Mac Developer Installer: Alain_B (64......J5) certificate login Apr 19, 2027 at 8:32:51AM

Apple Development: Alain_B (35......P5) certificate login Oct 19, 2027 at 9:29:59 AM

Apple Development: Alain_B (Alain_B ) private key login

Apple Distribution: Alain_B (64MZBY64J5) certificate login Oct 26, 2027 at 9:36:16 AM

Alain_B private key login

Apple Root CA certificate login Feb 9, 2035 at 4:40:36 PM

Apple Worldwide Developer Relations Certification Authority certificate login Feb 19, 2030 at 7:00:00 PM

Apple Worldwide Developer Relations Certification Authority certificate login Mar 18, 2036 at 8:00:00 PM

Developer ID Certification Authority certificate login Feb 1, 2027 at 5:12:15 PM

Developer ID Certification Authority certificate login Sep 16, 2031 at 8:00:00 PM


What can I do ?
Thank you.

Answered by DTS Engineer in 917648022

Thanks for that.

And, honestly, I prefer a text attachment (-:

These commands show that you have no 3rd Party Mac Developer Installer signing identity. Which brings us back to:

Written by Alain_B in 857890021

But Keychain Access show "3rd Party Mac Developer Installer" is in Certificates:

In Certificates? What about in My Certificates?

Remember that My Certificates shows digital identities. So if a certificate shows up in Certificates but not in My Certificates it means that you’re missing the private key that matches the public key in that certificate.

I discuss this confusing terminology in depth in TN3161 Inside Code Signing: Certificates. That’s in the context of code signing, but installer package signing works pretty much the same way [1].

As to where that public key went, it’s hard to say. It’s most likely on the Mac that you used to originally request that certificate. If you have that handy, you should run Keychain Access on that Mac, add your 3rd Party Mac Developer Installer certificate to the keychain, and see if it then shows up under My Certificates.

If you can’t find it that way then the easiest path forward is to revoke that certificate and create a new one.

IMPORTANT I’m recommending this path because this is an App Store certificate. If you distribute your product directly using Developer ID signing it pays to search much harder for the missing private key. I talk about that in The Care and Feeding of Developer ID. You can apply the same techniques here if you want, but revoking and re-creating is much easier and doesn’t have any negative consequences for App Store certificates.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] The core certificates and digital identities behaviour is the same. The difference is one of policy. That’s why, when you look for code-signing identities you run this command:

% security find-identity -p codesigning -v

but when you looking for installer-signing identities you omit the -p codesigning option.

What does this report?

% security find-identity -v

If it doesn’t list your signing identity, try again like this:

% security find-identity

ps I copied command from Packaging Mac software for distribution, which is my go-to reference for this sort of thing.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

replyt.txt(1.2 KB)

Sorry, I cannot reply with text: "This post contains sensitive language. Please revise it in order to continue."

Thanks for that.

And, honestly, I prefer a text attachment (-:

These commands show that you have no 3rd Party Mac Developer Installer signing identity. Which brings us back to:

Written by Alain_B in 857890021

But Keychain Access show "3rd Party Mac Developer Installer" is in Certificates:

In Certificates? What about in My Certificates?

Remember that My Certificates shows digital identities. So if a certificate shows up in Certificates but not in My Certificates it means that you’re missing the private key that matches the public key in that certificate.

I discuss this confusing terminology in depth in TN3161 Inside Code Signing: Certificates. That’s in the context of code signing, but installer package signing works pretty much the same way [1].

As to where that public key went, it’s hard to say. It’s most likely on the Mac that you used to originally request that certificate. If you have that handy, you should run Keychain Access on that Mac, add your 3rd Party Mac Developer Installer certificate to the keychain, and see if it then shows up under My Certificates.

If you can’t find it that way then the easiest path forward is to revoke that certificate and create a new one.

IMPORTANT I’m recommending this path because this is an App Store certificate. If you distribute your product directly using Developer ID signing it pays to search much harder for the missing private key. I talk about that in The Care and Feeding of Developer ID. You can apply the same techniques here if you want, but revoking and re-creating is much easier and doesn’t have any negative consequences for App Store certificates.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] The core certificates and digital identities behaviour is the same. The difference is one of policy. That’s why, when you look for code-signing identities you run this command:

% security find-identity -p codesigning -v

but when you looking for installer-signing identities you omit the -p codesigning option.

In Keychain Access the hex number in Apple Distribution: Alain Birtz (64......J5) certificate
and 3rd Party Mac Developer Application: Alain Birtz (64......J5)
does not match the one in Apple Development: Alain Birtz (35......P5)
[64......J5 not equal to 35......P5] is it normal ?

But
codesign --display -vv "Very Large Number Calculator" output:
Authority=Apple Development: Alain Birtz (35......P5)
match the hex in Apple Development: Alain Birtz (35......P5)

Dragging mac_installer.cer (3rd Party Mac Developer Installer: Alain Birtz (64......J5)) to Keychain Access "My Certificates" list
put the certificate in Keychain Access "Certificates" instead of Keychain Access "My Certificates".
Revoke the certificate, delete it in Keychain Access, and re-install do not change anything.
What can I do ?

Copy and Paste "3rd Party Mac Developer Installer: Alain Birtz (64......J5)" from Keychain Access "Certificates"
to Keychain Access "MY Certificates" does not work either.

Do I need any certificates in Keychain Access "Certificates" to build and submit Mac application in Apple Store Connect ?
Can I delete everything in Keychain Access "Certificate" ?