-
-
Notifications
You must be signed in to change notification settings - Fork 104
Give signtool absolute paths to the files to sign #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #242 +/- ##
===========================================
- Coverage 48.77% 47.56% -1.22%
===========================================
Files 220 220
Lines 12654 12649 -5
Branches 1224 1223 -1
===========================================
- Hits 6172 6016 -156
- Misses 6168 6326 +158
+ Partials 314 307 -7 ☔ View full report in Codecov by Sentry. |
|
https://learn.microsoft.com/en-us/azure/trusted-signing/how-to-signing-integrations suggests that the minimum signtool version is 22621 and the dlib requires net8 - are you using an old version of the dlib intentionally, requiring an older signtool and net6? (ppy said you were using signtool 22000 and you said your dlib is on net6) |
|
I also noticed that the MSFT article lists .NET 8. My observation comes from downloading the nupkg (as listed in the article) and inspecting the And yes, the irony of the major rollforward is not lost on me here... That being said, the DLL is a mishmash of both native and managed components - it doesn't look to be quite NativeAOT, which may explain the rollforward not actually working here (and why it requires a system install of .NET). I dunno... But at the very least, we're using the latest available version of the dlib.
We ran into issues using Velopack's included signtool with the dlib: https://melatonin.dev/blog/code-signing-on-windows-with-azure-trusted-signing/#comment-13954, so we changed to using the signtool included via the Windows SDK on the runner. According to https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md, this would be That was a result of looking around at how other projects are doing the same thing, and noticing gh-cli: https://github.com/cli/cli/blob/5be59997d31d3207148f5e8a8608882976471253/script/sign.ps1#L13-L17 Another noteworthy discovery is also that the GitHub action mentioned in that article downloads specifically the 22621 version of Microsoft.Windows.SDK.BuildTools that includes the signtool. I wasn't really involved in the "how or why" of the above - I only suggested doing what other projects do and use the Windows SDK, so I haven't looked into whether VPK's signtool is newer or older than required to result in the issue... (Though I've been told VPK's comes from the Win11 SDK?) |
We ship signtool x64 10.0.22621 from the windows sdk, that's correct. |
We've recently updated to use Azure Trusted Signing and as part of the process
signtoolis given a dlib DLL that implements the signing function.The complete setup looks like this: https://github.com/ppy/osu-deploy/blob/c8c9b70b0e1ad14711ae8976a86f4644c72cf15d/Builders/WindowsBuilder.cs#L32-L52
Importantly, the Azure signing dlib is a .NET 6 module. For us, it was failing to load with the exception:
It looks like this is caused by
signtoolbeing run inside the Velopack output directory and, since we target .NET 8, it was loading .NET libraries from the current directory that it is not actually compatible with.The simple solution for us is to give
signtoolabsolute file paths, though I'm not sure how digestible this sort of change is...