[Pkg-mono-svn-commits] [SCM] mono branch, master, updated. debian/2.10.5-1-10-g4067135
Mirco Bauer
meebey at meebey.net
Mon Jan 16 06:01:12 UTC 2012
The following commit has been merged in the master branch:
commit 80b0a2d142e42c9df84ae5e4ffed3ab11114e355
Author: Sebastien Pouliot <sebastien at ximian.com>
Date: Wed Mar 30 14:11:31 2011 -0400
Add support for validating RSA-based X.509 certifcates using SHA256
* X509Certificate.cs: Add mappings for 1.2.840.113549.1.1.11
(cherry picked from commit 21453a99ea73a7b248db3f30c1d11d18847e8936)
diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs b/mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs
index e951e4b..aee471a 100644
--- a/mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs
+++ b/mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs
@@ -303,6 +303,9 @@ namespace Mono.Security.X509 {
case "1.2.840.10040.4.3": // SHA1-1 with DSA
hash = SHA1.Create ();
break;
+ case "1.2.840.113549.1.1.11": // SHA-256 with RSA Encryption
+ hash = SHA256.Create ();
+ break;
default:
return null;
}
@@ -400,6 +403,7 @@ namespace Mono.Security.X509 {
case "1.2.840.113549.1.1.4": // MD5 with RSA encryption
case "1.2.840.113549.1.1.5": // SHA-1 with RSA Encryption
case "1.3.14.3.2.29": // SHA1 with RSA signature
+ case "1.2.840.113549.1.1.11": // SHA-256 with RSA Encryption
return (byte[]) signature.Clone ();
case "1.2.840.10040.4.3": // SHA-1 with DSA
@@ -507,6 +511,10 @@ namespace Mono.Security.X509 {
case "1.3.14.3.2.29":
v.SetHashAlgorithm ("SHA1");
break;
+ // SHA-256 with RSA Encryption
+ case "1.2.840.113549.1.1.11":
+ v.SetHashAlgorithm ("SHA256");
+ break;
default:
throw new CryptographicException ("Unsupported hash algorithm: " + m_signaturealgo);
}
--
mono
More information about the Pkg-mono-svn-commits
mailing list