To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: Powershell Studio 2017 5.4.145
version of product: x64
Operating system:
OS: x64
*** Please add details and screenshots as needed below. ***
I am trying to use the Output Settings on a project to automate signing the EXE output. It works, but the algorithm it uses is SHA1 and I do not know how to designate SHA256.
It's easy enough with Set-AuthenticodeSignature to designate the -HashAlgorithm. How do I do this in the Output Settings?
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Designating the algorithm in signing certificate
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Designating the algorithm in signing certificate
I'm not sure what you mean by Output settings. Are you referring to the packager Post Build commands?
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Designating the algorithm in signing certificate
If you want to use Set-AuthenticodeSignature instead of the built-in signing, you will have to call PowerShell.exe directly in a post build command:
powershell.exe -command "Set-AuthenticodeSignature -FilePath myscriptname.exe -HashAlgorithm SHA256"
According to Set-AuthenticodeSignature help documentation, PowerShell V2 uses SHA1 and a default and V3 and up use SHA256 as a default.
powershell.exe -command "Set-AuthenticodeSignature -FilePath myscriptname.exe -HashAlgorithm SHA256"
According to Set-AuthenticodeSignature help documentation, PowerShell V2 uses SHA1 and a default and V3 and up use SHA256 as a default.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Designating the algorithm in signing certificate
FYI, in the next service release the default for the internal signing will be set to SHA256.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Designating the algorithm in signing certificate
I am currently using Set-AuthenticodeSignature, i would like to do it at Build time so its not an extra step to do.
The OUTPUT SETTINGS tab on the same Build Settings screen you are showing...
The OUTPUT SETTINGS tab on the same Build Settings screen you are showing...
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Designating the algorithm in signing certificate
If you use the command David showed you in the Post-build commands, this will happen at build time.
It does not require an extra step. Pre- and Post- build commands are designed to keep you from doing any custom steps manually.
It does not require an extra step. Pre- and Post- build commands are designed to keep you from doing any custom steps manually.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.