43

Get Info on an .app does not produce the signature information. On Windows for example, right-click > properties will expose who signed the file.

How do I obtain that info for a given .app on OS X?

  • What happens if you look in Contents/_CodeSignature ?? – GEdgar Feb 18 '13 at 18:47
49

You can check a file by issuing the following command in Terminal:

 codesign -dv /Applications/Whatever.app

There is a free tool that implements the functions of the codesign command and extends it with a nice GUI. It's called RB App Checker (on the App Store) as well as a site describing the program http://brockerhoff.net/RB/AppCheckerLite/

I've not needed anything but these two tools for checking code signing on OS X so hopefully they fit your needs. Do check out the AppChecker if your Mac doesn't have codesign (some older ones needed Xcode to get that tool before gatekeeper shipped).

As to how you would know, the OS will show untrusted apps as dim and with a generic icon until the gatekeeper process approves a bundle to run - but that code could still be signed so you can't rely on a visual clue to necessarily tell if some code has or has not been signed - especially considering that gatekeeper could be disabled on a given Mac.

  • 15
    -dvvv adds rows for the certificate authorities, hash type, and literal hash. -dv (or -dvvv) doesn't actually show if the signature is valid or invalid. -v shows if the signature is valid, and if it is not, -vv also prints modified files. – Lri Feb 18 '13 at 19:37
  • @Lri The listed certificate authorities are just text strings. Anyone can create any certificate authority they like with any name. So in addition to this, how do we check that the hashes correspond to trustworthy CAs? Do we want the CandidateCDHash, or the CDHash? Does any of this establish that there aren't bogus root authorities or the like installed? – nealmcb Feb 7 at 18:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .