volks73 / cargo-wix

A cargo subcommand to build Windows installers for rust projects using the WiX Toolset
https://volks73.github.io/cargo-wix
Apache License 2.0
316 stars 26 forks source link

Add command line option for the sign tool to change hash algorithm #154

Open volks73 opened 2 years ago

volks73 commented 2 years ago

The /fd <hash_algorithm> is now required for the signtool (#149). The immediate fix is to hard-code the certHash value for the <hash_algorithm>. This is fine for now, but a command line argument and related [metadata.package.wix] field should be added to allow override of this option by the user if needed in the future.

From the SignTool.exe documentation:

/fd | Specifies the file digest algorithm to use for creating file signatures. Note: An error is generated if the /fd switch is not provided while signing.

/fd certHash | Specifying the string certHash will default to the algorithm used on the signing certificate. Note: An error is generated if the /fd switch is not provided while signing.