When using all timestamp servers in Visual Studio 2019, the outcome is the same (SHA1), but if I use signtool.exe from command line with the stampserver http://timestamp.digicert.com?alg=sha256, my exe file becomes signed with SHA384 !!!
So far so good, but we're half the way, because the problem seems to be in mage.exe, if I run it from command line:
mage.exe -u "D:\AppName.application" -appm "AppName.exe.manifest" -Algorithm sha386RSA -cf "cert.pfx" -Password XXXXXXX
The result is: Algorithm has to be sha1RSA or sha256RSA. Specified - "sha386RSA".
If I switch to SHA256RSA, then manifests are still signed with SHA1.
Now, according to this post there seems to be a bug in mage.exe, if certificate has a higher hash than SHA256 the internal logic signs with SHA1, instead of going down to SHA256.
Any idea how to workaround this issue?