castlabs / electron-releases

castLabs Electron for Content Security
https://castlabs.com/resources/downstream/
MIT License
227 stars 43 forks source link

Order of operation for EVS signing, MacOS code signing, MacOS notarization #166

Closed gligon101 closed 6 months ago

gligon101 commented 1 year ago

I have an app that involves streaming DRM capabilities with Spotify using the castLabs build here. Here's the problem I'm currently having:

Then I take it a step further:

EVS signing signs the top level of myApp.app where Electron's osx-sign goes in and signs every aspect of the built app. Should I only be osx-signing certain portions of the app? i.e. myApp.app\ Contents/Frameworks/myApp Helper ??

Ultimately if I EVS sign and successfully codesign without breaking EVS signing, will the notarization process break the EVS signing?

khwaaj commented 1 year ago

Looks like you are doing most things right, and the entitlements is the likely culprit. Notarization should not break anything, in fact I know of several projects using this successfully. There are however some potential complications related to what needs to be notarized, e.g. see here:

https://github.com/castlabs/electron-releases/issues/161#issuecomment-1609020079

eXhumer commented 7 months ago

Hello @khwaaj. If I am not mistaken, I have to first VMP sign a package first, then OSX sign the package correct? It seems like using the osxSign from the electron-forge config is out of the question and I instead have to use signAsync from @electron/osx-sign package inside the postPackage hook as the OSX signing process in electron-forge appears to happen before postPackage hook is reached. Using osxSign instead of signAsync causes the package to appear as damaged.

khwaaj commented 7 months ago

Yes, on macOS you should VMP-sign first and code-sign after (on Windows the reverse is true). I'm not familiar with integrating this in electron-forge, but I know there have been some previous threads on the topic that might provide some hints if you get stuck.

khwaaj commented 6 months ago

Closing due to inactivity.