2008-06-03 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Tue, 3 Jun 2008 14:50:54 +0000 (14:50 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Tue, 3 Jun 2008 14:50:54 +0000 (14:50 -0000)
* X509Certificate.cs: Accept text before the PEM certificate itself.
[Fix bug #396486]

svn path=/trunk/mcs/; revision=104761

mcs/class/Mono.Security/Mono.Security.X509/ChangeLog
mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs

index 57c9743e529eaffd272464d3503fe014899752c0..537a370dabd18d958170b5b6a21525e4f048cf8f 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-03  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * X509Certificate.cs: Accept text before the PEM certificate itself.
+       [Fix bug #396486]
+
 2007-05-09  Sebastien Pouliot  <sebastien@ximian.com>
 
        * PKCS12.cs: Adds SecretBag support. Patch by Jay Miller.
index 81af6d0aa2457f7fffdba51c700f2e6a25d6634f..38edf17e71eb4a629c1b973221fb594466ace580 100644 (file)
@@ -214,7 +214,7 @@ namespace Mono.Security.X509 {
                {
                        if (data != null) {
                                // does it looks like PEM ?
-                               if ((data.Length > 0) && (data [0] == 0x2D)) {
+                               if ((data.Length > 0) && (data [0] != 0x30)) {
                                        try {
                                                data = PEM ("CERTIFICATE", data);
                                        }