Skip to content

feat: Allow @electron/windows-sign to take over Squirrel codesigning - #501

Merged
felixrieseberg merged 7 commits into
mainfrom
felixr-windows-sign
Mar 4, 2024
Merged

feat: Allow @electron/windows-sign to take over Squirrel codesigning#501
felixrieseberg merged 7 commits into
mainfrom
felixr-windows-sign

Conversation

@felixrieseberg

Copy link
Copy Markdown
Member

This PR enables @electron/windows-sign to "hijack" codesigning within Squirrel. It does so by using @electron/windows-sign's ability to create a custom signtool.exe that's actually a "single executable application" built with Node.js, calling @electron/windows-sign underneath.

This, in turn, allows developers to customize their codesigning pipelines - with custom tools, scripts, and even per-file configurations. Now that Windows will only accept EV Codesigning certificates, many developers are faced with codesigning scenarios that are more complex - involving custom tooling, cloud-based solutions, and other shenanigans.

For details on how this all works underneath the hood, check out electron/windows-sign@8b23eaa

Decision to not make this a breaking change

  • @electron/windows-installer only requires Node.js >= 8.0.0.
  • @electron/windows-sign requires Node.js >= 16.0.0.
  • @electron/windows-sign's "fake signtool.exe" feature requires Node.js >= 18.0.0, the first version to contain the "single executable" feature.
  • Since this is overall a very niche feature and only benefits consumers with rather advanced codesigning needs, I did not want to make Node.js v18 a hard requirement for @electron/windows-installer. Instead, @electron/windows-sign is an optional dependency - and if it didn't install, we'll throw a useful error only if people are trying to use the new windowsSign parameter.
@felixrieseberg
felixrieseberg requested a review from a team as a code owner February 4, 2024 21:42
@anaisbetts

Copy link
Copy Markdown
Contributor

Seems reasonable to me, it is important that Squirrel invoke signtool.exe (i.e. rather than trying to run Squirrel without signing then signing the EXE file after-the-fact) or else certain files will end up not signed correctly like the generated stub files that Squirrel makes

Comment thread spec/sign-spec.ts Outdated
felixrieseberg pushed a commit to electron/windows-sign that referenced this pull request Feb 29, 2024
In order to get electron/windows-installer#501
over the hump, I'll need `@electron/windows-sign` to install fine on
Node 14. Turns out, we don't really need Node 16, so I'm just
downgrading our requirements here.

This is a non-breaking change.
@felixrieseberg
felixrieseberg merged commit 598aa70 into main Mar 4, 2024
@felixrieseberg
felixrieseberg deleted the felixr-windows-sign branch March 4, 2024 20:44
@continuous-auth

Copy link
Copy Markdown

🎉 This PR is included in version 5.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 participants