[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:26 UTC 2012
The following commit has been merged in the master branch:
commit ab802933577efce347b3cac14b8f244487aa7046
Author: Sebastien Pouliot <sebastien at ximian.com>
Date: Mon Apr 4 11:30:11 2011 -0400
Fix X.500 DN comparison
* X500DistinguishedName.cs: Fix DN comparison. See
D00FB2B40594C460D1D7F5E5A12F6654455D9247 and
D13835AF247D70C32E1032798939CFD32B2BFEA2 in bnc #682619
(cherry picked from commit 8ac5a7ca67f196331407cd555d20715f67a09ab7)
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X500DistinguishedName.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X500DistinguishedName.cs
index bfe9128..31b00c8 100644
--- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X500DistinguishedName.cs
+++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X500DistinguishedName.cs
@@ -179,10 +179,11 @@ namespace System.Security.Cryptography.X509Certificates {
private static string Canonize (string s)
{
- int i = s.IndexOf ('=');
- StringBuilder r = new StringBuilder (s.Substring (0, i + 1));
+ int i = s.IndexOf ('=') + 1;
+ StringBuilder r = new StringBuilder (s.Substring (0, i));
// skip any white space starting the value
- while (Char.IsWhiteSpace (s, ++i));
+ while (i < s.Length && Char.IsWhiteSpace (s, i))
+ i++;
// ensure we skip white spaces at the end of the value
s = s.TrimEnd ();
// keep track of internal multiple spaces
--
mono
More information about the Pkg-mono-svn-commits
mailing list