Developer ID Installer xxx this identity cannot be used for signing code

Trying to sign a Munkitools.pkg I get the error message 


Developer ID Installer: Buymax Pty Ltd (V66AU3MHBS): this identity cannot be used for signing code



Issuing this command
Code Block
security find-identity -p codesigning 


finds a bunch of codesigning identities but not the ‘Developer ID installer’ identity

I did initially find that codesign was not in the attributes of the cert I’m trying to use but adding it did not help

The only difference I’ve been able to find between the Developer ID Installation cert (which doesn’t work) and the Developer ID Application cert (which can be used but won’t validly sign an installer) is in one of the attributes called Purpose #1 in the pics- ‘code signing’ is missing in the one that doesn’t work…

hmm can't post pics
The fact that the code signing purpose is missing from your Developer ID Installer identity is expected; that identity is not used to sign code.

Run the following command:

Code Block
% security find-identity


That is, without specifying a purpose. You should see two lists:
  • Matching identities

  • Valid identities only

Which of these lists includes your Developer ID Installer identity?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Thanks Quinn,
Thanks for the reply- much appreciated.

Using that command I can verify-
'Developer ID Installer' appears once in 'Matching Identities'
'Developer ID Installer' appears once in 'Valid Identities'

However your reply does give some clues. On trying again,
Code Block
pkgutil --check-signature /package.pkg

does say the package is validly signed. Also opening the installer and clicking the padlock shows the correct cert.



So it's really spctl that's barfing.
Instead of using
Code Block
spctl --assess -vvvv /package.pkg

I use
Code Block
spctl -a -t install --context context:primary-signature -v /package.pkg

And this gives a slightly different error about notarisation.
Is it possible that spctl is giving errors because the .pkg is not notarised?
If yes, then the errors are appallingly vague




found it- SPCTL not needed as the installer will be deployed with MDM

The issue was my script was using 'sign-binaries' instead of 'sign-package'

Thanks for your help Quinn
Developer ID Installer xxx this identity cannot be used for signing code
 
 
Q