IMPORTANT NOTE: Apple has changed the way OSX handles certificate from other non-Apple vendors by creating an option in GateKeeper that makes the entire system disallow ALL certificates not created by Apple. After decades of all Apple OSes recognizing the major CAs (like Comodo/Sectigo), this change is quite a surprise. Unfortunately there is no work-around for this as Apple has steadfastly refused to change the default setting to allow other CA's certificates to work like they always have. Because of this we no longer claim that these certificates are supported on OSX natively -- however they *should* still work with Java on the OSX platform.

Code signing in Mac OS X Leopard and Snow Leopard:

If you collected your certificate on your Mac then it is already in keychain access. If you collected the certificate on another computer and just have a .PFX or .P12 file, follow these instructions :

  1. Save the PFX/P12 file on your Mac's hard disk.
  2. Start Keychain Access from Applications/Utilities
  3. Select File -> Import Items, select the PFX/P12 file
  4. Choose "login" or "system" as the destination for the certificate
  5. Click Open and specify the password you used when you created the certificate

To sign a Mac .app file, open a Terminal window and type :

codesign -s "My Company Name" "My"

(Make sure you use a full path to the file name)

Press Enter and confirm if prompted.

To verify the signature, type :

codesign -v "My"

If there is no response then your app is signed and you're ready to go.