dotnet / sign

Code Signing CLI tool supporting Authenticode, NuGet, VSIX, and ClickOnce
MIT License
447 stars 84 forks source link

Rewrite ClickOnce signing to sign files directly instead of via the .clickonce zip mechanism #656

Closed jackmtpt closed 3 months ago

jackmtpt commented 4 months ago

This is my first-draft implementation of signing for clickonce files that doesn't require you to zip up everything into the .clickonce file. Instead, you can just point the tool at your .application file (or .vsto) and it will figure out which other files need to be signed and sign them all for you. The actual signing still happens in a temporary path (as it does for other file types) and then the results are copied back in-place to the original location.

I wrote this a couple of months ago but finally got approval from my company to contribute it back to the project. I've rebased it onto the latest main this morning.

We're not using this in production yet; we'd prefer to wait until this work has been accepted into the upstream repository before we build on it internally. I'm happy to work with the maintainers and change the code/design around as-needed to get this merged.

Resolves #643 and #470.

jackmtpt commented 4 months ago

@dotnet-policy-service agree company="Trayport"

jackmtpt commented 4 months ago

Yeah I figured it was fine to just remove it all since as you say, it's still pre-release and it simplifies things considerably. I'll sort out the docs + error message now.

jackmtpt commented 3 months ago

@jackmtpt, first, big thanks for the contribution. It's appreciated.

Second, I reviewed your PR, and it looks good. Thank you for adding tests.

I had some minor feedback, which I offered up as a commit which you can simply incorporate.

Please rebase on latest main and ping me when ready for re-review. Thanks!

Cheers - your changes look good and I've applied your commit. Rebased to main.