diff options
author | Vladimir Kazakov <vladimir.kazakov@live.com> | 2018-01-05 01:20:13 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-01-05 01:20:13 +0300 |
commit | d0369589868f971fd13668906b178b158541344e (patch) | |
tree | e54e28eac29de0bcf23552bf9857f553287f3cf4 /mcs/class/corlib | |
parent | 87315d19c6bdbb76f916b0f5c0df5043e717f579 (diff) |
XMLDSIG from .NET Core. (#6154)
Diffstat (limited to 'mcs/class/corlib')
3 files changed, 4 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs index bd9af4717b1..31748bb4832 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs @@ -204,6 +204,7 @@ public partial class CryptoConfig { private const string urlSHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"; private const string urlSHA384 = "http://www.w3.org/2001/04/xmldsig-more#sha384"; private const string urlSHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"; + private const string urlHMACSHA1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"; private const string urlHMACSHA256 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"; private const string urlHMACSHA384 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"; private const string urlHMACSHA512 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"; @@ -384,6 +385,7 @@ public partial class CryptoConfig { algorithms.Add (urlSHA256, defaultSHA256); algorithms.Add (urlSHA384, defaultSHA384); algorithms.Add (urlSHA512, defaultSHA512); + algorithms.Add (urlHMACSHA1, defaultHMAC); algorithms.Add (urlHMACSHA256, defaultHMACSHA256); algorithms.Add (urlHMACSHA384, defaultHMACSHA384); algorithms.Add (urlHMACSHA512, defaultHMACSHA512); diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs index 5cef04313c4..bb67bfa14f5 100755 --- a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs @@ -94,6 +94,7 @@ namespace System.Security.Cryptography { case "system.security.cryptography.hmac": case "system.security.cryptography.hmacsha1": case "hmacsha1": + case "http://www.w3.org/2000/09/xmldsig#hmac-sha1": return new HMACSHA1 (); case "system.security.cryptography.hmacsha256": case "hmacsha256": diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs index a3e95c65a66..0099a29f0f6 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs @@ -148,7 +148,7 @@ public class CryptoConfigTest { CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.RSAPKCS1SHA256SignatureDescription"); CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.RSAPKCS1SHA384SignatureDescription"); CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.RSAPKCS1SHA512SignatureDescription"); - CreateFromName ("http://www.w3.org/2000/09/xmldsig#hmac-sha1", null); + CreateFromName ("http://www.w3.org/2000/09/xmldsig#hmac-sha1", "System.Security.Cryptography.HMACSHA1"); // URL used in DigestMethod element CreateFromName ("http://www.w3.org/2000/09/xmldsig#sha1", "System.Security.Cryptography.SHA1CryptoServiceProvider"); // URL used in Canonicalization or Transform elements |