Quote from: CCRDude on May 15, 2017, 08:24:14 pmIt works now on macOS to sign the main binary; I could probably add Info.plist signing as well.That is great. AFAIK, it is necessary, however, to sign the whole app on macOS, rather than the binary only.
It works now on macOS to sign the main binary; I could probably add Info.plist signing as well.
I updated the code to support certificate property substrings as an identifier, since that's the easiest way for codesign on macOS (-s <email of Apple dev cert>), made a bunch of fields not yet supported invisible on macOS, and tested with codesign.Plus, I need to find out how to get the output of TProcess on macOS. The pipe routines that work on Windows seem to fail still...
Quote from: jwdietrich on May 15, 2017, 08:38:04 pmQuote from: CCRDude on May 15, 2017, 08:24:14 pmIt works now on macOS to sign the main binary; I could probably add Info.plist signing as well.That is great. AFAIK, it is necessary, however, to sign the whole app on macOS, rather than the binary only.I assume you're referring to signing the disk image, eg,signtool -s "Mac Developer: Dev Name (DevCertNum)" -v someapp.dmghttps://developer.apple.com/library/content/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG18
In the final step before uploading / selling etc. a Mac app it should be signed. This refers to the whole app and not to the binary. In addition, you might want to sign a DMG image, but this is another story.
The fact that Lazarus creates the executable outside the bundle is a longtime Laz defect.
Quote from: Phil on May 15, 2017, 10:23:29 pmThe fact that Lazarus creates the executable outside the bundle is a longtime Laz defect.Well, this defect is easy to circumnavigate, but of course it would be better, if Lazarus would automatically create self-contained applications.
Not sure what <email of Apple dev cert> refers to.
I've used TProcess on Mac for years without problem. Can you give an example of TProcess code that doesn't work?
To make the things more complex Lazarus creates the binary outside the app, and the folder MacOS contains an alias to the binary only (which has to be replaced by the original binary before deploying the app).
In todays malware-poisoned world, it's nice to be able to show that a file has not been modified since leaving the original author. A correctly signed file is proof that it isn't infected by a virus (unless the author himself has infected the file). It makes it easier to trust software. ...snip..But speaking about open systems reminds me of something. Nearly twenty years ago, before I even knew about Authenticode, I supplied pgp signatures with the files of my application. That could be something worth adding as well, and would be something useful on Linux.
...FreeBSD also uses SHA265 in its ports system to verify all user installed software against the originals....
The certificates issued by Apple seem to have the email address as part of their subject, so this was the easiest way I found to identify them (e.g. „Mac Developer: username@domain.com (CAFFEE00)“).
On Windows, I enumerate through the MY store to show a list of certificates to pick from. For the Mac I haven’t found an equivalent yet.
Yes, that makes signing the whole .app more difficult, thanks for pointing that out! My new workaround is for the codesigning to remove the symlink and move the executable into the bundle, then sign the bundle.
Cool, that's 9-bits more secure than the standard SHA256 ...