How to add codesigning to dmg file in mac

MacDeveloper picture MacDeveloper · May 23, 2014 · Viewed 20.2k times · Source

I have a dmg file in my portal.After downloading it,when i try to open it is showing a message indicating that opening package is insecure. i am able to add codesign through command line using codesign command and also able to check whether it is added or not. but still when i click to open my dmg file insecure message is coming

Answer

Graham Miln picture Graham Miln · Jun 20, 2016

As of macOS 10.11.5 you can now sign disk images, .dmg, files using the codesign tool:

codesign -s <identity> --keychain <full-path-to-keychain> <path-to-disk-image>