diff options
author | Romain Marcadier-Muller <romain.muller@telecomnancy.net> | 2019-01-21 16:29:45 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2019-01-21 16:29:45 +0300 |
commit | 7cd9e0314dff5f4d0bfa5659cce45d03b4e1aaa7 (patch) | |
tree | 3c21287544db621f52100257f664934fe5be166d /mcs/class/Mono.Security | |
parent | 32aa0ad724f3a8a0db6ae8863268b4c371e9cbba (diff) |
[signcode.exe] Allow use of new hash algorithm (#11999)
Enable SHA256, SHA384 and SHA512 hash algorithms to be used for
Authenticode signatures. This enables producing digital signatures that
are trustworthy using the `mono` tooling.
Fixes #7517
Diffstat (limited to 'mcs/class/Mono.Security')
-rw-r--r-- | mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs index 0729bec2f49..8770738704c 100644 --- a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs +++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs @@ -88,8 +88,14 @@ namespace Mono.Security.Authenticode { switch (h) { case "MD5": case "SHA1": + case "SHA256": + case "SHA384": + case "SHA512": hash = h; break; + case "SHA2": + hash = "SHA256"; + break; default: throw new ArgumentException ("Invalid Authenticode hash algorithm"); } |