Improve VM-Assert-Signature & restore hash installation for RegCool #1157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation of
VM-Assert-Signature
usesGet-AuthenticodeSignature
status, that only checks that the file has a syntactically syntactically valid signature. Verify the signing authority usingsigntool.exe
.This new signature verification using
signtool.exe
does not work for RegCool. Restore the previous installation checking the SHA256. As the tool is using a URL that does not include the version, the hash will change with every update, breaking the package. If the package is updated often, we will need to remove it from the default configuration (replacing it total-registry) or researching if it is possible to usesigntool.exe
to verify the package. I suggest we discuss this outside this PR.Note that the current
regcool.vm
package implementation being replaced in this PR had an important bug:VM-Assert-Signature
was not called at all, asGet-ChildItem -Path "$toolDir\*.{exe,dll}"
does not match any file.Closes #1144